open encyclopedia * Article Search: * *
*
*

File transfer protocol

From open-encyclopedia.com - the free encyclopedia.

The File Transfer Protocol (FTP) is a software standard for transferring computer files between machines with widely different operating systems. It belongs to the application layer of the Internet protocol suite.

FTP is an 8-bit client-server protocol, capable of handling any type of file without further processing, such as MIME or Uuencode. However, FTP has extremely high latency; that is, the time between beginning the request and starting to receive the required data can be quite long, and a sometimes-lengthy login procedure is required.

Contents

Overview

FTP is commonly run on two ports, 20 and 21. Port 20 is a data stream which transfers the data between the client and the server. Port 21 is the control stream and is the port where commands are passed to the ftp server. While data is being transferred via the data stream, the control stream sits idle. This can cause problems with large data transfers through firewalls which time out sessions after lengthy periods of idleness. While the file may well be successfully transferred, the control session can be disconnected by the firewall, causing an error to be generated.

The objectives of FTP are:

  1. To promote sharing of files (computer programs and/or data).
  2. To encourage indirect or implicit use of remote computers.
  3. To shield a user from variations in file storage systems among different hosts.
  4. To transfer data reliably and efficiently.

Disadvantages are:

  1. Passwords and file contents are sent in clear text, allowing eavesdropping which may be unwanted.
  2. It is hard to filter active mode FTP traffic on the client side by using a firewall, since the client must open a random port in order to make the connection. This problem is largely resolved by using passive mode FTP.
  3. It is possible to tell a server to send to an arbitrary port of a third computer.

FTP, though usable directly by a user at a terminal, is designed mainly for use by FTP client programs.

Many sites that run FTP servers enable so-called "anonymous ftp". Under this arrangement, users do not need an account on the server. By default, the account name for the anonymous access is 'anonymous'. This account does not need a password. Although users are commonly asked to send their email addresses as their passwords for authentication, there is no verification.

Active and passive mode

There are two modes that can be used for FTP: active and passive. Active mode requires both the client and the server to open a port and listen on it in order to establish an FTP session. As this often causes problems with firewalls on the client computer, passive mode was created. Passive mode requires only the server to have a process listen on a port, and thus it bypasses firewall issues on the client computer.

An active mode FTP connection is established in the following manner:

  1. A random unprivileged port (a port with a number above 1024, in this case we will call it x) is opened on the client and the FTP program connects to port 21, known as the command port, on the server. The source port is now the random port number x on the client and the destination port is port 21 on the server.
  2. The client starts listening to port (x+1) and sends a PORT command to the server (via the server's command port 21) that tells the server the port number it is listening to and that it is ready to receive data on this port. This port is known as the data port.
  3. The server opens source port 21 and connects to the client's data port. The source port is port 21, and the data port (x+1) is the destination port.
  4. The client opens a connection to port 21 on the server via the client's data port and then sends the server an acknowledgment that it has established the connection.

FTP and web browsers

Most recent web browsers and file managers can connect to FTP servers. This allows manipulation of remote files over FTP through an interface similar to that used for local files. This is done via an FTP URL, which takes the form ftp://<ftpserveraddress>  (e.g., ftp://ftp.gimp.org/). A password can optionally be given in the URL, thusly:   ftp://<login>:<password>@<ftpserveraddress>. Most web-browsers require the use of passive mode FTP, which not all FTP servers are capable of handling.

References

The protocol is standardized in RFC 0959 by the IETF as:

See also

External links

  • NcFTP Client a free FTP client program with a command-line interface that has been maintained since 1990.
FileZilla 2.2.1b FTP client on Windows 2000
FileZilla 2.2.1b FTP client on Windows 2000

bg:File Transfer Protocol da:FTP de:File Transfer Protocol es:FTP fr:File transfer protocol it:FTP he:FTP nl:File Transfer Protocol ja:File Transfer Protocol no:FTP pl:FTP pt:FTP ru:FTP fi:FTP sv:FTP zh:FTP

Contribute Found an omission? You can freely contribute to this Wikipedia article. Edit Article
Copyright © 2003-2004 Zeeshan Muhammad. All rights reserved. Legal notices. Part of the New Frontier Information Network.