Account Basics - Uploading Files With FTP
FTP stands for File Transfer Protocol. It is the most widely-used protocol designed for transferring files from one machine to another. It allows you to design your site locally (i.e. on your personal computer) and upload it to our servers when it is ready, among other benefits. Most FTP programs also allow you to create directories, rename and delete files, and set file permissions.Where can I get an FTP client?
WindowsWindows 9x/NT/XP ships with a command-line FTP program you can access by typing ftp and hitting return from a DOS prompt. This is a text-only FTP client, so if you plan to be using FTP often, or uploading many files at once, it may be easier to use a graphical FTP client, such as one of the following FTP programs:
MacintoshFor Macintosh, probably the most-used FTP client (and the one we recommend) is Fetch.
UNIX VariantsHow do I connect to the server and use my FTP client?FTP is a standard command-line tool on almost all UNIX systems. It can be accessed as "ftp" from a shell prompt.
Graphical ClientsIn most clients, a dialog box will appear after you select "Connect" (that or an equivalent option should be in the menus, most likely the "File" menu. You should give your account username, password, and server name in their fields in the box, then click the "Ok" (or equivalent) button to connect.Here is an example screenshot of WS_FTP:
In the above screenshot, edad.pair.com is just an example. You should substitute your actual server name -- see the pair Networks server details page.You may also choose an initial directory. To default into your web directory, set the initial directory to: /usr/www/users/username
Once connected, the command actions are similar to those described in the command-line section of this question. However, your client will have either buttons or menu options for selecting them.
Generally, you can take action on a file by double-clicking on its file name, and enter a directory in the same manner. With some clients, right-clicking (or clicking and holding on a Macintosh) may bring up a menu with various options for dealing with that file. Your best option is to read through the help files presented by the FTP program to get a feel for its style of operating.
Command-Line Style ClientsFirst, use the command:ftp gamma.pair.comto make a connection to the server. Enter your account username and password when prompted. (Note: you should not literally attempt to telnet or ftp to gamma.pair.com unless that is the server your account is on. A list of servers can be found on the Server Details page.)At this point, you are logged in to the system and can use such commands as cd :
...and put to upload a file:ftp> cd public_html 250 CWD command successful. ftp>...and get:ftp> put index.html 200 PORT command successful. 150 Opening ASCII mode data connection for index.html. 226 Transfer complete.Other important and useful commands include:ftp> get index.html local: index.html remote: index.html 200 PORT command successful. 150 Opening ASCII mode data connection for index.html (834 bytes). 226 Transfer complete.
- binary
- This indicates that the files being transferred are binary. This must be used to transfer image files such as GIFs and JPEGs. It should not be used for regular HTML files, however, although in most cases it will not matter. It especially matters, however, for imagemap control files and CGI scripts.
- ascii
- This indicates that the files being transferred are text. This should be used to transfer regular HTML files and other files that are readable as normal text. The reason for the text-vs-binary distinction is that text files are stored in a slightly different format on many systems, including PCs, Macs, and Unix. When the ascii mode is enabled, the files will be translated as needed during the transfer. Failure to properly select ASCII or Binary is the most common cause of broken images and inoperative imagemaps and CGI scripts.
- delete filename
- This is used to delete a file.
- quote site chmod permission filename
- This complicated command is used to change the permissions on a file. The permission can only be specified as an octal number - for more information login by Telnet or SSH and use the command "man chmod".
My FTP client 'autodetects' ASCII and BINARY files. Should I use that?
The "autodetect" feature of most graphical FTP clients works by learning what file extensions (.html, for example) indicate text files, and which indicate binary files. Unless you've entered all extensions you use, this method is imperfect. In particular, if you plan on using autodetect make sure that .pl and .cgi files are recognized as text files. Text files that are uploaded in BINARY format, particularly cgi scripts and mail configuration files, may exhibit strange behavior or simply not work at all.I uploaded a text file as BINARY and now it doesn't work right!
If possible, your best bet is to simply upload the file again in ASCII format, overwriting the previous copy. If that is not possible, and your account includes Telnet or SSH access, there are two utilities on the server to correct the files.If you created the file on a PC, Telnet or SSH to the server and run "pcfix.pl filename" after changing into the directory the file is located in. If you created the file on a Macintosh, follow the same procedure, but substitute macfix.pl for pcfix.pl.
I'm getting 'Blocking Call Cancelled' or some other error!
Generally speaking, FTP errors are reported in vague terms. "Blocking Call Cancelled," for instance, is a message report by Windows 9X/NT clients that can mean most anything, although it often indicates the presence of a firewall on the client side.As a first attempt at a solution, try changing your FTP client into "Passive" mode. The command-line command is PASV. Check the help files for more information on graphical clients.
ARTPlaces.com
is hosted by pair Networks
This support page is available at:
http://www.pair.com/support/knowledge_base/the_basics/uploading_files_using_ftp.html
Copyright © 1995-2001 pair Networks, Inc
