Zen and the Art of FTP: An FTP TutorialCopyright © 1996-1999 by Brock Wood
This web page was last updated on: December 15, 1999
Table of ContentsNote: This tutorial is easiest to use if you print it out first and then refer to the printed copy as you go through the procedures for each sample task.
- What is FTP, Anyway?
- FTP Fundamentals
- Connecting to FTP Sites with WS_FTP
- Using a Web Browser to Download from an Anonymous FTP Site
- Using the Windows 95 FTP Client
- Other FTP Tutorials on the Web
- About the Author
1. What is FTP, Anyway?FTP stands for "file transfer protocol." FTP is the internet's mechanism for transferring files between two computers. FTP allows you to get access to files stored in a directory on a hard drive on a remote computer connected to the internet. Sometimes we forget that the internet, when you strip away all the hype, is really still just a network of computers. And one of the primary purposes of a network is to allow different computers on the network to share each others resources, including files.
Some form of FTP is available to anyone who has access to the internet. FTP is an information "service" available to any internet user, just like the web and e-mail. FTP, like these other services, is independent of the software you use to access it. For example, if you use Windows, you can use both Netscape and other programs, like the Windows 95 FTP client or WS_FTP, to access internet files using FTP. If you use Unix, you would probably use the Unix FTP client. If you use the Macintosh operating system, there are likewise several FTP programs available for the Mac OS.
In this tutorial, we will first discuss the fundamentals of how FTP does what it does. Then we will do some hands-on downloading and uploading with WS_FTP, a popular shareware FTP program for Windows. In addition we will do some FTP downloading with Netscape, a popular world wide web browser for Windows.
2. FTP Fundamentals
Uploading and DownloadingSimply put, FTP allows you to enter a directory on a computer connected to the internet and transfer a file to or from that directory to another directory on another computer. Normally, you will be transferring the file to or from a large, multi-user computer and your own computer. File transfer can go in two directions. "Downloading," refers to a transfer of a file from a remote computer to your computer. "Uploading" refers to a transfer of a file from your computer to a remote computer.
In order to upload or download a file by FTP, you need to do four things:
- Login into a remote computer that has been configured as an FTP "server".
- Submit a username and a password to gain access to the remote system.
- Go into a particular directory on the remote system that contains the file you are interested in downloading or to which you wish to upload a file.
- Transfer the file to or from the system in question.
Anonymous and Non-anonymous FTPThere are two types of FTP connections available on the internet: "anonymous" and "non-anonymous". The most widely used type is anonymous FTP. In fact, you may have used it without even knowing it. Many web pages contain links to files that you can download. Often these links point to a file in an anonymous FTP directory. If a file is stored in an anonymous FTP directory, virtually anyone with internet access and an FTP program of some sort, even a web browser, can download the file. Uploading, on the other hand, is not possible with anonymous FTP. Anonymous FTP, therefore, is used primarily to give the internet public download access to a particular directory of files. Anyone can download files from the directory, but only the "owner" of directory can upload to the directory.
When you connect to any FTP directory, the host system asks for your username and password before allowing you access to the directory (this process is done behind the scenes when you use a web browser to access an FTP directory). With an anonymous FTP directory, any user can gain access because the username is always "anonymous" and the password is always the user's e-mail address.
Non-anonymous FTP, on the other hand, requires you to know the unique username and password for the FTP directory in question. Normally, you will use non-anonymous FTP to get access to directories that YOU OWN on an internet computer. For example, when you sign up with a commercial internet service provider (ISP), or get an internet account through school or work, you normally get a "home" directory on the ISP's computer assigned to you. You can use the disk space in this home directory for any purpose you choose. To get access to that directory, however, you will normally need to use FTP. Your ISP can tell you the name of the FTP "host" computer you must connect to as well as the username and password you must use to get access to your home directory.
3. Connecting to FTP Sites with WS_FTPWhile you can use the FTP program that comes with Windows 95 to get files using FTP, the Windows 95 FTP program is a text-based tool modeled after the Unix FTP client and is not very user-friendly. A much better program is the freeware program, "WS_FTP", which is available on the internet. Windows 3.x provides no built-in FTP program so, if you are using Windows 3.x, you will have to download your own FTP program, such as WS_FTP.
There are two versions of WS_FTP, a freeware version called WS_FTP "limited edition" or "LE" and a commercial product called the WS_FTP "Pro". The freeware "LE" version will work fine for this tutorial. However, if you like WS_FTP and use it a lot, I encourage you to support the author of the program and buy the "Pro" version. The Pro version is inexpensive (under $50 US), and selling it will help the author to continue the development of WS_FTP.
WS_FTP LE and WS_FTP Pro each come in two variants: A 32-bit Windows 95/98/NT version and a 16 bit Windows 3.x version. When you download WS_FTP, pick the variant appropriate to your operating system.
How to Download WS_FTP:Both WS_FTP LE and WS_FTP Pro come as self-extracting, self-installing download files. You must first download the self-extracting file to your hard drive. Then you run (double click) the downloaded file to install the WS_FTP program and the associated files. This tutorial will show you how to download the freeware version of WS_FTP, the "LE" version.
- Using your web browser, to go to the WS_FTP web site (this is the download page for WS_FTP LE, version 4.6):
- When you fill out the little form, select "Home User (non-commercial)" if you want the freeware version.
- As stated above, there are two WS_FTP variants available for download from this web site. One is a 32-bit, Windows 95/98/NT version of WS_FTP and the other is a 16-bit, Windows 3.x version of WS_FTP. Click on the download file appropriate for your operating system.
- If your web browser tells you that the file type is unknown and asks you what you want to do with it, just choose save to disk.
- When prompted, save the file to your disk. Write down the name of the file and the name of the directory you are saving it to.
- Start the File Manager or Explorer.
- Double click the download file to install the WS_FTP program.
How to Run WS_FTP:
- When you install WS_FTP, an icon to run it will be added to your system. If you are running Windows 95, click on Start and Programs and find the WS_FTP section. Click on the WS_FTP program to run it. If you are using Windows 3.x, find the new group called "WS_FTP", look inside of it, find the WS_FTP icon, and double click it.
Downloading a File From an Anonymous FTP Site with WS_FTPWhen you start WS_FTP, the first window you are presented with is the "Session Properties" (see the example below). In this window (which has four "tabbed" sub-windows), you can create a login script, or "session," that specifies all the details you need to connect to a particular FTP directory on a particular internet computer.
Using the guide, below, fill in your session profile with each of the items from example 1, below. As you fill in these items, you will begin to understand how an FTP connection works.
Please note that not all versions of WS_FTP look exactly like the examples below. All of the features mentioned below, however, should be available to you. Just poke around the WS_FTP interface until you find them.
Filling out Your "Session Profile"You should start on the "General" tab, as illustrated above. Click on "New" to create a new session profile.
- Profile Name:
- The name you assign to a particular FTP session profile. This is completely up to you. The name you use should identify the site clearly so that you know what the site is and why you want to connect to it.
- Host Name:
- The name of the internet computer that hosts (contains) the FTP directory you want to connect to. Sometimes this is the internet "domain" name of the FTP computer. You will have to get this name from the owner of the FTP directory or from some other source. If you are the owner of the FTP directory, just ask the technical support folks at your internet service provider for the host name you should use to connect to this directory. The FTP directory we will connect to in this tutorial is stored on a computer owned by Rocky Mountain Internet, an internet service provider used by the author of this tutorial.
- Host Type:
- The type of operating system that the FTP host is running. Most internet computers, but not all, run the powerful, multi-user, Unix operating system. The dialog box in example 1 is set to "Automatic detect", which will make WS_FTP automatically determine the type of operating system it is connecting to. You can usually leave this setting on Automatic detect.
- Anonymous (checkbox):
- Unless you are the owner of this directory, or have been given the username and password by the owner, you will be logging in anonymously, as discussed above. If so, check this checkbox.
- Save Pwd (checkbox):
- Check this box so you don't have to fill in your password each time you login to this FTP site. If your computer is not in a secure environment, you might want to fill in your password each time you login. In that case, leave this checkbox unchecked. If you check this box, anyone with access to your computer can pretend to be you and login to this FTP directory.
- User ID:
- The username assigned to the person who owns this directory. If this is an anonymous FTP site, the username will be "anonymous" so that anyone on the internet may get access to the directory.
- The password assigned to the person who owns this directory. If this is an anonymous FTP site, the password will be your e-mail address. The e-mail address password is a courtesy to the owner of the anonymous FTP site. It tells the owner who is logging into the anonymous FTP directory.
- This applies only to certain older FTP host computers. Most FTP users can leave this field blank. For more information on this field, see the WS_FTP on-line help.
- In this field, you can write in a description of the site and why you want to connect to it. Or, you can leave it blank, as illustrated above.
OK, now click on the "Startup" tab.
You will see the following window:
You can leave all of the other fields blank.
- Initial Remote Host Directory:
- This specifies the FTP directory on the remote host that contains the files you are interested in getting access to. Note that the slashes that separate the directories are "forward" slashes (/), as opposed to the "back" slashes (\) that DOS and Windows users are familiar with. This is because the FTP host computer in the example runs the Unix operating system. If you leave this dialog box blank, you will login to a default directory on the host system. When in doubt, leave this box blank.
- Initial Local Directory:
- This specifies the directory on your local computer where downloaded files will go to and uploaded files will come from. You can fill in this box with the name of a directory that actually exists on your hard drive. Or, if you leave this dialog box blank (as shown in the example), a default directory (normally the WS_FTP directory) will be used.
Got all that? Great!
- Click on OK to connect to this FTP site. Your "session profile" will automatically be saved.
Once you connect...Note the split screen. WS_FTP conveniently splits your screen into two lists of files. On the left side of the window are your local files, the ones on your computer. On the right side you will find the files that reside on the FTP site.
Look at the bottom of the WS_FTP screen. See the radio buttons labeled ASCII and Binary? Next to the radio buttons is a checkbox labeled Auto. These buttons and the checkbox control the method that WS_FTP will use to transfer a file (ASCII v. Binary). This is an important concept that is worth a little time to learn.
The FTP protocol can transfer a file either as an ASCII (i.e., plain text) file or as a binary file. An ASCII file contains nothing but alpha-numeric text characters, carriage returns, and line feeds. Any file you can read with a plain text editor, such as the Windows Notepad, is an ASCII file. Web page files (.HTM or .HTML files), for example, are ASCII files because they can be read by any text editor. Graphic image files (for example, .GIF and .JPG files), on the other hand, are binary files - you can't read these files in a text editor.
Why is this important? ASCII files can be transferred using either the ASCII method or the binary method. Binary files, on the other hand, must be transferred using the binary method, or they can become corrupted when you transfer them. If you don't know whether a particular file is ASCII or binary, transferring it as a binary file is the safest way to go.
Before you transfer a file using WS_FTP, you must select the proper transfer type for the file in question. You choose the transfer type by clicking on the ASCII or Binary radio button at the bottom of the WS_FTP window and by unchecking the Auto button. What does the Auto checkbox do? If you check the Auto checkbox, WS_FTP will recognize only files that end in .TXT as ASCII files. If you select the Auto checkbox, all .TXT files will be transferred as ASCII files. All other files will be transferred as binary files. Checking Auto overrides the ASCII and Binary radio buttons.
You can configure WS_FTP so that it automatically recognizes additional filename extensions (such as .HTM or .HTML) as ASCII files. Click on the Options button. Click on Extensions. Type in the extension of a ASCII file you intend to upload and download (for example, .HTM or .HTML). Click on Add. When you are finished, click on OK.
OK, with that aside out of the way, let's go ahead and transfer a file.
- Find the vertical scroll bar under the Remote System side of the screen.
- Scroll down until you can see this file:This file is a "rich text file." Rich text files are readable by most word processors. This file contains year-to-date statistics for all of the quarterbacks in the National Football League as of the date it was created. Hey, it's an EXAMPLE, OK?
To download this file to your hard drive:
- Click on the ASCII radio button. A rich text file is an ASCII type of file. Uncheck the Auto checkbox so that WS_FTP won't automatically transfer the file as binary file.
- Click once on ytdqb.rtf with your cursor.
- Click on the left pointing arrow in the middle of your screen (see example 2, below).
Note how the "gas gauge" window indicates that the file is downloading to your hard drive. When the download is complete, both sides of your screen refresh and you can now see that the "ytdqb.rtf" file has downloaded to your hard drive. Neat, huh?
When you are done downloading,
- Click on Close to disconnect from this FTP site.
- Click on Exit to exit out of WS_FTP.
Downloading and Uploading a File From a Non-anonymous FTP SitePreparing a non-anonymous FTP session with WS_FTP is very similar to the above example for anonymous FTP. The two differences are that you must specify a unique User ID and password in your profile and you can now upload, as well as download, once you connect!
This time we'll create and save an FTP session profile in WS_FTP for your "home" directory on your internet service provider's computer. Remember from the above discussion that your home directory is the directory on your internet service provider's computer that was assigned to you when they setup your account. How do you find out what the WS_FTP settings are for your home directory? Just ask your internet service provider.
Let's fill in the new, non-anonymous FTP session profile:
OK, let's login.
- Click on New.
- Fill in the Profile Name.
- Fill in the Host Name.
- Find the Anonymous checkbox. It should be unchecked.
- Find the Save Pwd checkbox. Check it so that you don't have to enter the password each time you login. If your computer is in an insecure environment, leave this unchecked.
- Fill in your User ID.
- Fill in your Password.
- Click on the Startup tab. Find Initial Remote Host Directory. Leave this blank. You will automatically login to your home directory.
- Fill in Initial Local Directory with the name of a directory on your local hard drive. Or leave it blank.
Click on a file on the left side of your screen with your cursor and then click on the right pointing arrow button to upload the file to your home directory on the remote computer. Try downloading by first clicking on a file on the right side of your screen and then clicking on the left pointing arrow button. Easy, isn't it?
- Click on OK to login to your home directory. The session profile will automatically be saved for you.
When you are finished,
- Click on Close to disconnect from the remote computer, then
- Click on Exit to end the WS_FTP session.
Setting Access Permissions on a Remote File Using WS_FTPIf you are uploading files to a Unix web server, you may need to set the Unix access "permissions" on the uploaded files so that the files can be accessed by the internet public. You could do this by using a "telnet" program to connect to the command line of the web server in question. After connecting, you would then enter the Unix "chmod" command from the Unix command line on the file in question. An easier way, however, is to upload the file using WS_FTP and then use WS_FTP to set the access permissions. Make sure you download the current version of WS_FTP from the WS_FTP web site as some of the older versions of WS_FTP do not have the ability to set access permissions on remote files.
- Connect to your home directory on your ISP's computer per the instructions above for accessing a non-anonymous FTP site.
- Find a file (preferably a web page file) in the list of files on the "remote system" side of the WS_FTP window.
- Click the file once to select it.
- RIGHT click the file. Yes, that means click the right mouse button, not the left button.
- A menu pops up. Click on the item called chmod (UNIX).
- Another screen pops up. You can now choose the access permissions for this file. For a normal web page file you should check the read and write checkboxes for owner (you) and the read checkbox only for group and other. When you have finished, click on "OK".
- The idea is to give everyone (owner, group, and other) read access to the file. Only the owner, however, should have write access to the file, as write access allows the file to be changed.
- If you successfully set the new access permissions on the file, you should see "200 CHMOD command successful" down near the bottom of the WS_FTP window.
- Repeat as needed on other files. When done, click on close and exit to end your WS_FTP session.
4. Using a Web Browser to Download from Anonymous FTP SitesIf all you intend to do is download from anonymous FTP directories, rather than upload to your own directories, you might not want to use WS_FTP at all. Virtually all web browsers support connections to anonymous FTP sites, allowing you to download files from these sites while also browsing the web.
We will use the Netscape browser for this example, but the concepts are the same regardless of the browser you use.
When you specify an FTP site you want to login to using Netscape, you include the name of the host computer and the name of the anonymous FTP directory, just like you did in WS_FTP's session profile screen. In the above example, our FTP host computer was:and the directory was
shell.rmi.netWe can add the FTP host system and directory together, like so:
/pub2/bwoodTo get Netscape to connect to the FTP site, however, we have to give it more than just the host computer computer name and FTP directory name. We have to tell Netscape what "type" of site it will be connecting to. We do this by adding a "protocol" prefix at the beginning of the host system and directory sequence. For FTP sites, the prefix is "ftp://" (as opposed to the more familiar "http://", which would indicate a web site). When you add the prefix, the host system, and the directory name together, you get an "URL" (uniform resource locator) that you can connect to using your world wide web browser. An URL takes takes this form:
shell.rmi.net/pub2/bwoodOur example, from above, would look like this as an URL we could plug into a web browser:
prefix://host/directoryLet's try it.
- Start Netscape.
- Click on File and Open Page....
- Fill in the dialog box with
- Click on Open to connect to this FTP site.
When you are logged into the anonymous FTP directory, you will see the same files and folders you saw when you used WS_FTP, only Netscape will display the files slightly differently.
This file should now download to your hard drive, as demonstrated in example 3, below.
- Find the vertical scroll bar on the right side of the Netscape window
- Scroll down to the ytdqb.rtf file.
- Click on the ytdqb.rtf file.
- If the Unknown File Type dialog box opens, click on Save File, otherwise, go on to the next step.
- The Save As... dialog box will pop up. To save the file into the current directory, just click on Save. To save it to a different directory, click on the down arrow button just to the right of the Save In dialog box and select another directory.
Note that, if you had known the name of the file you wanted before you started, you could have logged into it directly, using this URL:
5. Using the Windows 95 FTP ClientSo you don't want to be bothered with downloading and installing WS_FTP, huh? OK, here's how to use the built-in Windows 95 FTP client. We will download a file from the anonymous FTP directory we have been using in the above examples.
- Click on Start
- Click on Run
- Type in ftp and hit ENTER (Windows 95 FTP starts up)
- Type in open and hit ENTER
- Type in shell.rmi.net and hit ENTER (the login prompt appears)
- Type in anonymous and hit ENTER (the password prompt appears)
- Type in your e-mail address and hit ENTER (you are now logged into the Rocky Mountain Internet FTP server)
- Type in cd /pub2/bwood and hit ENTER (this logs you into the directory we were using before)
- Type in ls -x and hit ENTER (this brings up a list of the files in the directory)
- Find the file named ytdte.rtf. See it? Good. Go to the next step.
- Type in get ytdte.rtf and hit ENTER (the file downloads to your hard drive. What directory on your hard drive did it download to? Ha! Good question. A little later in this example, we'll go find it on your hard drive.
- Type in quit and hit ENTER (this will shut down the FTP connection)
- Click on Start
- Click on Find
- Click on Files or Folders... (the find utility starts)
- Type in ytdte.rtf and hit ENTER (when the search is done, note the location of the file)
- Click on File
- Click on Close (this will shut down the find utility)
6. Other FTP Tutorials on the WebI used to have a list of other web-based FTP tutorials in this section of the tutorial. Unfortunately, these tutorials seemed to go out of existence rather often, requiring frequent updating of this section. To find other tutorials, I would just go to the Alta Vista search engine at http://www.altavista.digital.com and plug in some reasonable seach terms, such as "ftp tutorial".
If you find other good FTP tutorial sites that seem fairly permanent, send e-mail to Brock Wood (email@example.com) and I will add them to this list.
7. About the AuthorThe author of this tutorial is Brock Wood, an internet consultant and attorney based in Evergreen, Colorado, USA. His internet consulting company is called Eureka! Internet Services. Brock has extensive experience designing customized, high-quality web sites for clients of all sizes and budgets. Want Brock to design a web site for you? Just send e-mail to firstname.lastname@example.org. Or call (303) 674-9390.
Brock also maintains a general interest web site atThe web site contains links to useful government information, computer utility programs, games, on-line magazines and newspapers, art, music, and other nifty stuff. Check it out!
Copyright © 1996-1999 by Brock Wood, 7347 S. Brook Forest Road, Evergreen, CO 80439
[ Go to Top ]