Directory

Encyclopedia

NodeWorks
                              ENCYCLOPEDIA

Link Checker

Home
Encyclopedia : F : FI : FIL :

File Transfer Protocol

 

File Transfer Protocol

See file transfer protocol (disambiguation) and FTP (disambiguation) for alternative meanings.
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.

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 hostss.
  4. To transfer data reliably and efficiently.

Disadvantages are:

  1. Passwords and file contents are sent in clear text, which can be intercepted by eavesdroppers.
  2. Multiple TCP/IP connections are used, one for the control connection, and one for each download, upload, or directory listing. Firewall software needs additional logic to account for these connections.
  3. It is hard to filter active mode FTP traffic on the client side by using a firewall, since the client must open an arbitrary port in order to receive the connection. This problem is largely resolved by using passive mode FTP.
  4. It is possible to abuse the protocol's built-in proxy features to tell a server to send data 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, usually there is trivial or no verification, depending on the FTP server and its configuration.

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., [1]). A password can optionally be given in the URL, e.g.:
  ftp://<login>:<password>@<ftpserveraddress>. Most web-browsers require the use of passive mode FTP, which not all FTP servers are capable of handling.

Commands

! escape to the shell $ execute macro account send account command to remote server append append to a file ascii set ascii transfer type bell beep when command completed binary set binary transfer type bye terminate ftp session and exit case toggle mget upper/lower case id mapping cd change remote working directory cdup change remote working directory to parent directory chmod change file permissions of remote file close terminate ftp session cr toggle carriage return stripping on ascii gets delete delete remote file debug toggle/set debugging mode dir list contents of remote directory disconnect terminate ftp session form set file transfer format get receive file glob toggle metacharacter expansion of local file names hash toggle printing '#' for each buffer transferred help print local help information idle get (set) idle timer on remote side image set binary transfer type lcd change local working directory ls list contents of remote directory macdef define a macro mdelete delete multiple files mdir list contents of multiple remote directories mget get multiple files mkdir make directory on the remote machine mls list contents of multiple remote directories mode set file transfer mode modtime show last modification time of remote file mput send multiple files newer get file if remote file is newer than local file nmap set templates for default file name mapping nlist nlist contents of remote directory ntrans set translation table for default file name mapping open connect to remote tftp prompt force interactive prompting on multiple commands proxy issue command on alternate connection sendport toggle use of PORT cmd for each data connection put send one file pwd print working directory on remote machine quit terminate ftp session and exit quote send arbitrary ftp command recv receive file reget get file restarting at end of local file rstatus show status of remote machine rhelp get help from remote server rename rename file reset clear queued command replies restart restart file transfer at bytecount rmdir remove directory on the remote machine runique toggle store unique for local files send send one file site send site specific command to remote server Try "rhelp site" or "site help" for more information size show size of remote file status show current status struct set file transfer structure system show remote system type sunique toggle store unique on remote machine tenex set tenex file transfer type trace toggle packet tracing type set file transfer type user send new user information umask get (set) umask on remote side verbose toggle verbose mode ? print local help information

References

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


NodeWorks boosts web surfing!
Page Returned in 2.031 seconds - HTML Compressed 68.2%

This article is from Wikipedia. All text is available
under the terms of the GNU Free Documentation License.
 GNU Free Documentation License
© 2008 Chamas Enterprises Inc.