Learning Movable Type: FTP, File Formats, and Permissions


Installing Movable Type requires uploading many files to a web server using an FTP (File Transfer Protocol) program. The files must be loaded in the proper format and then the correct permissions must be set for each of the files in order for MT to work. If you are new to FTP then the Movable Type installation instructions can seem a little confusing.

FTP

Installing Movable Type requires that you know how to use an FTP program. FTP stands for File Transfer Protocol. There are many FTP programs available; typing "FTP" into Google will yield several. For my Mac, I use Fetch. Transmit and Cyberduck for the Mac have also had good reviews. WS_FTP has been recommended as a good Windows FTP client, as well as SmartFTP.

File Formats

The installation instructions call for you to upload certain files in ASCII mode and certain files in Binary mode. Movable Type is written in Perl and PHP, which are text-based scripts. So most of the MT files need to be uploaded in ASCII mode, another name for Text mode. The images that MT uses for its editing interface are .gif files and as such need to be uploaded in Binary or BinHex mode. Many FTP programs will figure out what type of file you are uploading and automatically assign the proper mode for uploading. I have found this to not work that well on Fetch. Basically you need to upload all of the files as ASCII text files except for the image files which should be uploaded as binary files. If you use this automatic feature and end up having problems on the install, check the individual files to make sure they were uploaded in the proper format.

Setting Permissions

The single thing that is most to blame for an MT script not working properly is that its permissions were not set properly. CHMOD is a Unix command that tells the server how much access it should permit to a file. You may see "CHMOD" and "set permissions" used interchangeably in MT documentation and Support Forum threads. In your FTP program there will be an option for setting the permissions or CHMOD for files that you upload. (In Fetch FTP, it is listed under the "Remote" menu bar. In WS_FTP or SmartFTP, if you right click on the file you will see a command called "chmod".)

The Movable Type CGI scripts (all the files that end with .cgi) must each have their permissions set to 755. Permissions set to 755 means that all users on the system have Read and Execute permissions; only the owner has Write permissions.

On Fetch, the permissions window for 755 would look like this:

chmod755.gif


On a typical Windows FTP client the window for 755 might look like this:

permissions.gif

If your server is NOT running Movable Type under cgiwrap or suexec, the folder in which your weblog files are stored must have its permissions set to 777 - owner, group, and other all have read, write, and execute privileges. Also, if you are using Berkeley DB as your database AND you are NOT running MT under cgiwrap or suexec, the db directory must have its permissions set to 777 as well.

Links:
CHMOD tutorial
Understanding UNIX permissions and chmod


Many thanks to Arvind from Movalog for his contributions to this tutorial.

Please direct ALL questions regarding installation of Movable Type troubleshooting to the MT Support Forums. There is an entire section of the forums devoted to installation and setup issues. I will leave comments open here for those who want to add to, correct, or clarify something in this tutorial. Other comments may get deleted.


Posted by Elise Bauer on August 28, 2004 2:08 PM to Learning Movable Type http://www.learningmovabletype.com/