File Transfer Protocol

What is FTP?

The typical question asked by people who have created their first web page is, "How do I make it available over the Web?" As we discussed in the introductory notes, files are provided to users of the Internet by computers called servers. The vast majority of Internet files, however, are created on computers other than servers. Therefore, a mechanism must be in place to allow the programmer to transfer their files from the development computers to the server. That mechanism is called File Transfer Protocol or FTP.

In order for two people to communicate, you need to have a common language with rules such as grammar and pronunciation. Computers need rules to communicate too or they will be unable to understand the information being sent to them. FTP is the set of rules that defines how two computers communicate, specifically for the purpose of passing files back and forth.

As a rule, servers understand FTP. If a computer begins communicating to a server using the rules of FTP, the server will automatically understand. The problem then becomes how to teach your own computer this language.

There are plenty of programs available that allow your computer to communicate using FTP to transfer files from your computer (often referred to as the local machine) to a server (often referred to as the remote machine). The program that we use here at ETSU is called WS-FTP. It is available to students through this download site. Double click on the ws_ftp32.exe file, and when prompted, save the file to a folder on your harddrive. After the file downloads, execute the file by double-clicking on it from Windows Explorer and follow the directions to install it on your machine.

Information You Need to Use FTP

There are a few pieces of information that you need in order to make a connection with a server to begin transferring files. First, you need to be able to identify the server among the thousands of servers that are on the network. This identification is called a URL. In a later class we will cover the details of URLs, but for now it is enough to understand that a URL is a text string containing groups of alphanumeric characters separated with periods. Below are a couple of examples of URLs.

cscidbw.etsu.edu
ftp.linux.org

In order to transfer files between the local machine and a server, the server must give you permission to have access to its files. To do this, you must have a user id (a name uniquely identifying you as a user) and a password to provide security to the files that you have stored on the server. These items are usually provided to you by a human being, the system administrator of the server.

Some servers allow anonymous connection to their FTP services. This is typically a service to copy files from the server to the local machine (downloading). You will not be able to store files to the server. In these cases, the userid will be the word "anonymous" and the password should be your e-mail address.

For this class, you should all have userids and passwords set up on our server. Your userid and password for this course will be the same as the z-name and password that you use on the ETSU network.

Using WS_FTP

From the Start->Programs menu, run WS_FTP. The program window should come up along with a log-in window. The log-in window is shown below.

Log-in window to connect with server

This window contains the components that were discussed in the section "Information You Need to Use FTP". The following list describes the purpose of each field in this window.

Once you've filled in the appropriate information listed above into the log-in window fields, click the OK button. Assuming the network connection is good and the server is available, the next thing you should see is the WS-FTP connection window.

WS_FTP connection window

The window of files to the left represents the local machine's files. The window to the right represents the server's files. The two buttons between them allow for transferring to and from the server: --> uploads to the server and <-- downloads to your local machine.

To begin a file transfer to the server, select the file you wish to send by clicking on it and highlighting it with the mouse. In the right window, make sure the window is displaying the correct folder or directory on the server where you wish to send the file. To send the file, simply click on the button labeled -->. Use the same process in reverse to download a file from the server to your local machine.

To aid you in determining what folder or directory you are currently showing, the text box above the directory windows displays the current directory of the local machine and the server.

Once you have completed all of the transfers you wish to make, click on the button labeled "Close". This is similar to hanging up the phone on a connection you have made.

Binary versus ASCII

Immediately below the directory windows, you should see three checkboxes, two of which are labeled ASCII and Binary. These two buttons are used to denote the different types of files you will be sending using FTP. It is critical that you understand the difference.

ASCII files are files that contain ONLY letters, numbers, or basic punctuation. For the purpose of this class, all of our HTML files are in ASCII format.

Some files, however, do not represent readable text. These include graphic files, multimedia files, or programs. When sending any files such as these, make sure the Binary button is selected.