File Transfer Protocol

The File Transfer Protocol [ fʌɪl trɑ ː ns ˌ ˌ fə prəʊtəkɒl ] (FTP, English for file transfer method ) is a 1985 specified in RFC 959 Network protocol for transferring files over IP networks. FTP is located in the application layer (layer 7 ) of the OSI layer model. It is used to transfer files from server to client (downloading ) from client to server ( upload) or client- controlled between two FTP servers ( File Exchange Protocol). In addition, you can create directories and read and renamed or deleted directories and files with FTP.

The FTP used for control and data transfer each separate connections: An FTP session begins by the Client to the Control port of the server ( the default port for this is port 21) establishes a TCP connection. Using this connection, commands are sent to the server. The server responds to each command with a status code, often with an attached, explanatory text. Most commands, however, are permitted only after a successful authentication.

Connection types

To send and receive files as well as for the transmission of directory listings ( the default port for port 21 ) is for one operation uses a separate TCP connection. FTP knows for the development of such compounds two modes:

Active FTP

In active FTP (also called " Active Mode " ) the client opens a random port and tells the server these and your own IP address using the PORT or EPRT commands with. This is typically a port on the client that is beyond 1023, but may also be a different server, which in turn was connected in the passive mode, ie a connection is waiting ( a so-called FXP ). Data transmission on the server side is done via port 20 Communication with instructions is solely at the control port. It also speaks of the control " out of band ". Thus, it remains possible that the partners can still communicate with each other during data transfer.

Passive FTP

In passive FTP (also called " passive mode " ), the client sends a PASV or EPSV a command, the server opens a port and sends this together with the IP address to the client. Here one port is used beyond 1023 and on the server side of the previously transmitted to the client port on the client side. This technique is used when the server can not connect to the client. This is for example the case if the client is behind a router that rewrites the address of the client using NAT, or if a firewall shields the the client's network from outside access.

Public FTP server

Many FTP servers, and servers in particular from universities, colleges and mirrors, offer so-called anonymous FTP. Such FTP servers are also called Pub ( v. Engl. Public, public '). Here's to log in addition to the real user accounts a special user account, typically "anonymous " and / or " ftp", provided for which no (or any ) password must be specified. Earlier it was part of the "good manners " to specify its own, valid e -mail address as the password for anonymous FTP. Most web browsers do this no longer, as it is not recommended for anti-spam reasons.

FTP software

For the data transmission method, a FTP client is required. In many current browsers, an FTP client is usually already integrated. An example of the syntax of an FTP address in the browser:

Ftp:// [ ftp_username [: ftp_pwd ] @ ] servername [: port] The client establishes the TCP connection to the control port of a server. Through this connection is controlled via FTP commands, the data exchange between client and server. Must be distinguished from the commands for the operating system associated with the terminal client "ftp", see also FTP terminal client.

In addition WebFTP is a service offered by Web servers service, which provides access to the FTP server via HTTP. The presentation takes place within a web browser. An installation of client software on a local machine is omitted by it.

A Free / Libre Open Source Software to transfer files using FTP is FileZilla.

Security

To use encryption and authentication, Transport Layer Security can be used (FTP over SSL, FTPS short ). After authentication, the host and the FTP TLS encryption can authenticate the client user name and password when the client has not been authenticated using a certificate over TLS.

In addition, the SSH File Transfer Protocol ( SFTP), there is a building on SSH alternative to FTP for file management and transfer, in which only used the already running sshd daemon, and thus no additional software is required on the server side.

28200
de