Using FTP
FTP(File Transfer Protocol) is an interface that lets you
upload to and download from your webserver account. This is
necessary for publishing HTML pages to your site, but often
the FTP function is taken care of behind the scenes by the
WYSIWYG HTML editor (such as Front Page or Dreamweaver). When
writing or installing CGI scripts, you generally have to use
an FTP application to manually upload the script files to
your webserver.
FTP Basics
The first step is to obtain an FTP application. Your best
bet is to search download.com
or shareware.com.
After you install one of these applications, you can open
an FTP session to your ISP. How you do that depends on the
ftp program you install. Most of the grahpical interface programs
have something like "New Connection" in the File menu. You
type the name of your host (ex. columbia.digiweb.com, enscript.com)
along with your user ID and password.
Fig 1. New Connection
screen using Fetch
Once connected, you can use the GUI interface
to navigate the directory structure on your webserver.
You can then choose to get (ie. download)
or put (ie. upload) files.
Fig 2. File transfer
screen using Fetch
Transfer Mode
Most FTP programs allow you to specify the transfer mode
either globally or manually for each file. In Fig. 2 above,
there is a pull-down menu to select the mode at the bottom
of the window. The automatic setting is often the default,
but is not always reliable. To transfer HTML and text script
files, make sure the transfer mode is set to "ASCII"
or "Text". Use the "Raw Data" or "Binary"
transfer mode for images, compressed (ex. *.zip, *.tar) files
and compiled programs. Using the wrong transfer mode can cause
a CGI script to not function properly.
File Permissions
Often you will be required to change the file
permissions after you have uploaded files using FTP. Using
your FTP program, you should be able to view and change the
file permissions on any file or directory. On Fetch, for example,
there is a Set Permissions option in the Remote menu that
brings up a window for setting the appropriate permissions.
Fig 1. Set Permissions
screen using Fetch
And More...
Most FTP programs will also allow you to
execute a limited number of UNIX
commands on the remote server. Typically you can create,
delete, rename and move files or directories at a minimum.
Check the documentation for your specific program to see
how these commands are supported.
General references
|