Science Fair Project Encyclopedia
File Transfer Protocol
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.
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:
- To promote sharing of files (computer programs and/or data).
- To encourage indirect or implicit use of remote computers.
- To shield a user from variations in file storage systems among different hosts.
- To transfer data reliably and efficiently.
- Passwords and file contents are sent in clear text, which can be intercepted by eavesdroppers.
- 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.
- 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.
- 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., ftp://ftp.gimp.org/). 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.
! 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
- RFC 0959 File Transfer Protocol (FTP). J. Postel, J. Reynolds. Oct-1985. (Format: TXT, 147316 bytes at http://www.ietf.org/rfc/rfc959.txt ) This obsoleted the preceding RFC 765 and earlier FTP RFCs back to the original RFC 114.
- Trivial File Transfer Protocol (TFTP)
- SSH file transfer protocol (sftp), a protocol running over SSH
- Secure FTP, FTP run over SSH
- Simple File Transfer Protocol (SFTP), the historic protocol RFC 913
- Archie search engine
- FTP client
- FTP server
- NcFTP Client a free FTP client program with a command-line interface that has been maintained since 1990.
- Filezilla a freely distributable GPL licensed FTP client for Windows.
- Cyberduck a freely distributable GPL licensed FTP/SFTP client for Mac OS X.
- FTP Tutorial Basic commands
- RFC 0959 File Transfer Protocol (FTP). J. Postel, J. Reynolds. Oct-1985.
- An Overview of the File Transfer Protocol explains how the FTP works at the protocol level.
- The FTP and Your Firewall details FTP's problems with firewalls and how to deal with them.
- Tutorials for Beginning Computer Users: Introduction to the File Transfer Protocol (FTP)
- Active vs. Passive FTP explained and illustrated
- FTP Sequence Diagram
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details