Introduction to FTP - Part - 1

I. What is FTP?

FTP, or File Transfer Protocol, is the name of the application and the protocol used for moving files between two hosts on a TCP/IP network.

Client and Server

There are two machines involved in an ftp transaction, a client machine, which is sometimes called the local host, and a server machine, which is sometimes called the remote host. The client is always the machine that initiates the transfer. During an ftp session, it is extremely important to keep track of which machine is the client and which is the server, because this will determine whether you use a get command or a put command to move files. The get command is always used to copy files from the server to the client, and the put command is used to copy files from the client to the server. As a simple example, consider the case where your desktop computer (e.g., a Macintosh or a DOS PC) runs an ftp client in order to connect to the ftp server on the machine ux1.cso.uiuc.edu. To initiate the process on, say, a DOS machine, you might type the following command, using the Clarkson or PC/TCP ftp program:
C:\PCTCP>ftp ux1.cso.uiuc.edu

After some negotiation with ux1, your ftp client and the ux1 ftp server would be talking to each other, and you would type commands for putting and getting files. Since your PC was used to initiate the ftp connection, it is the client and ux1 is the server. In this case, "putting" means uploading files from your PC to the ux1, and "getting" means downloading files from the to your PC as shown in the diagram below:
The situation can be more complicated, and sometimes it's difficult to decide whether to put or to get. A common example of this is when you are running telnet on a PC to log in to your UNIX account. You log in to your account on ux1 and read your e-mail using Pine. Someone has sent you an attachment that is a DOS executable, typically a self-extracting ZIP file, and you want to download it to your PC. Many telnet applications have a built-in ftp server, allowing you, during a telnet session with a remote UNIX system, to initiate an ftp session from the UNIX system back to your PC. In fact, some telnet applications (e.g., NCSA telnet, PC/TCP, CUTCP), automatically generate the UNIX ftp command for you with the IP address filled in, as if you had typed the UNIX command:
ux1> ftp 128.174.xxx.yyy
where xxx and yyy have been replaced with the appropriate numbers from your machine's IP address. This is exactly equivalent to starting up the UNIX ftp client to establish an ftp connection with your PC. In this case, ux1 is the client machine (or local host), and your PC is the server machine (or remote host) as illustrated in the next diagram. (Needless to say, in this instance, the terms "local" and "remote" are counter-intuitive, since your PC is geographically "closer" to you than ux1.) In order to download your file to your PC, you must use the put command, since you are using the UNIX ftp client to copy the file to your PC, which is acting as the server machine. To upload files to your UNIX account, you would use the get command, for the same reason.
There is a third situation in which your PC, acting as a telnet client only, is used to initiate an ftp session between two remote computers, and therefore is not directly involved in the ftp transaction. In such instances, your PC is neither the ftp client nor the ftp server. For example, if you log in to ux1 and then use the ftp client on ux1 to start an ftp session between ux1 and uiarchive, ux1 is ftp client and uiarchive is the ftp server:
ux1> ftp uiarchive.cso.uiuc.edu
In this case, you get files from uiarchive to ux1, and, if you have special privileges, you can copy files to uiarchive using the put command. This situation is illustrated in the following diagram:


The proper use of several other ftp commands, in addition to put and get, also hinges on an understanding of client and server. For example, the the cd (change directory) command is used to move from one directory to another on the server. If you want to change directories on the client machine, you must instead use the lcd command, which stands for local change directory. As long as you keep in mind the examples and principles outlined above, however, you should have no trouble deciding when to put or get, whether to lcd or cd, etc.

What is Anonymous FTP?

Thousands of hosts on the Internet run ftp servers that permit guests to login. Such servers usually contain data and software of interest to the general public. They are often called anonymous ftp servers because the guest login name is anonymous. To login to an anonymous ftp server, enter the name anonymous when prompted for a username or userid. When prompted for a password, enter your full e-mail address, unless the on-screen instructions specify an alternative guest password.
 Control the FTP for software FileZilla

Please Select Embedded Mode To Show The Comment System.*

Previous Post Next Post