Zen and the Art of FTP: An FTP Tutorial
(In-depth Version)

Copyright © 1996-1999 by Brock Wood

This web page was last updated on: December 15, 1999


Table of Contents

Note: 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.

  1. What is FTP, Anyway?
  2. FTP Fundamentals
  3. Connecting to FTP Sites with WS_FTP
  4. Using a Web Browser to Download from an Anonymous FTP Site
  5. Using the Windows 95 FTP Client
  6. Other FTP Tutorials on the Web
  7. 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 Downloading

Simply 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:

  1. Login into a remote computer that has been configured as an FTP "server".

  2. Submit a username and a password to gain access to the remote system.

  3. 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.

  4. Transfer the file to or from the system in question.

Anonymous and Non-anonymous FTP

There 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_FTP

While 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.

How to Run WS_FTP:

Downloading a File From an Anonymous FTP Site with WS_FTP

When 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.

Example 1

[Session Profile Screen, General Tab]

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.

Password:

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.

Account:

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.

Comment:

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:

Example 1.1

[Session Profile Screen, Startup Tab]

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.

You can leave all of the other fields blank.

Got all that? Great!

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.

ytdqb.rtf
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:

Example 2

[Downloading with WS_FTP, Connected]

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,

Downloading and Uploading a File From a Non-anonymous FTP Site

Preparing 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 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?

When you are finished,

Setting Access Permissions on a Remote File Using WS_FTP

If 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.


4. Using a Web Browser to Download from Anonymous FTP Sites

If 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:

shell.rmi.net
and the directory was
/pub2/bwood
We can add the FTP host system and directory together, like so:
shell.rmi.net/pub2/bwood
To 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:
prefix://host/directory
Our example, from above, would look like this as an URL we could plug into a web browser:
ftp://shell.rmi.net/pub2/bwood
Let's try it.

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.

Example 3

[Downloading from an anonymous FTP site using Netscape]

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:

ftp://shell.rmi.net/pub2/bwood/ytdqb.rtf


5. Using the Windows 95 FTP Client

So 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.


6. Other FTP Tutorials on the Web

I 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 (bwood@eurekais.com) and I will add them to this list.


7. About the Author

The 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 bwood@eurekais.com. Or call (303) 674-9390.

Brock also maintains a general interest web site at

http://www.eurekais.com/brock
The 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 ]

Back to Download Games Now

Go to Brock's Home Page