4.4. Uploading Documents (FTP)
The most common transaction that a web designer will have with a web server is the uploading of HTML documents, graphics, and other media files. Files are transferred between computers over a network via a method called FTP (File Transfer Protocol).
If you are working in a telnet session on Unix, you can run the ftp program and transfer files with a hefty collection of command-line arguments (not covered in this book).
Fortunately, if you work on a Mac or PC, there are a number of FTP programs with graphical interfaces that spare you the experience of transferring files using the Unix command line. In fact, FTP functions are now built right into full-featured web authoring tools, such as GoLive, Dreamweaver, and FrontPage, among others. On the Mac, dedicated programs that allow "drag-and-drop" file transfer, such as Fetch and Interarchy (previously Anarchie), are quite popular. On the PC, there are numerous simple FTP programs, such as WS_FTP, AceFTP, and Transmit. These (and many others) are available for download at http://www.shareware.com (search for "ftp").
4.4.1. The FTP Process
Regardless of the tool you use, the basic principles and processes are the same. Before you begin, you must have an account with permission to upload files to the server. Check with the server administrator to be sure you have a login name and a password.
You don't necessarily need an account to upload and download files if the server is set up as an "anonymous" FTP site. However, due to obvious security implications, be sure that your personal directories are not configured to be accessible to all anonymous users.
4.4.2. Setting Permissions
When you upload files to a web server, you need to be sure that the files' permissions are set so that everyone is able to read your files. Permissions control who can read, write (edit), or execute (if it is a program) the file, and they need to be established for the owner of the file, the file's group, and for "everyone." When you create or upload a file, you are automatically the owner, which may mean that only you can set the permissions.
Some FTP programs enable you to set the default upload permissions via a dialog box. Figure 4-6 shows Fetch 3.0.4's dialog box for doing this. For most web purposes, you want to grant yourself full permissions but restrict all other users to read-only. You may want to confirm that your server administrator agrees with these settings.
Figure 4-6. Standard permissions settings (using Fetch 3.0.4)
The server needs to be specially configured to recognize these permissions commands, so check with your administrator to see if you can use this easy method. He or she will give you instructions if any special permissions settings are necessary.
Copyright © 2002 O'Reilly & Associates. All rights reserved.