A file transfer protocol client is a computer software application used for accessing a data server by using the file transfer protocol (FTP). Through the use of this common protocol, the client is able to transfer data to and from the server. The client application provides the means for establishing a connection and then issuing the appropriate FTP commands to the server. It comes in many forms, operated via a command line interface (CLI), a graphical user interface (GUI), even a common web browser.
FTP is part of the upper application layer of the Internet protocol (IP) suite, with the transmission control protocol (TCP) being used for the communications transport. The file transfer protocol client, then, is responsible for establishing the connection to the server by ultimately opening two TCP connections. The first is the control connection, where the client sends commands to the FTP server. The first commands sent over the control connection are the USER command, with the name of the user as an argument, and then the PASS command followed by the password. Once established, the control connection stays open throughout the entire session.
Here, the file transfer protocol client sets up the different modes of communication that it'll have with the server. Typically, data is represented in one of two ways, text or binary, depending on the data being sent or received. Text-type transfers are most often used for plain text files encoded with either the American Standard Code for Information Interchange (ASCII) encoding method. The binary mode, also referred to as image mode, is for the transfer of files in a non-text binary format, such as digital images. Another, called the local mode, is another way that FTP can transfer data using a unique or proprietary format.
The second TCP channel used by the file transfer protocol client is the data connection. This connection is temporary in nature and is created only when a client asks for a listing of the files on the server or is transferring a file either to or from the server. The data connection is then destroyed when no data transfer is occurring. The data connection is also unique in how it is established, either actively passively. The client has to tell the server the type of data connection to use depending on what type of connection is available on the client.
With an active data connection, the file transfer protocol client tells the server which TCP port number to use for the data connection. When used in passive mode, however, the client simply tells the server it is passive, and the server then informs the client which TCP port to use for the data connection. In most cases, the client is set up for a passive connection due to the use of firewalls that protect it from unauthorized access.
As a result of the general lack of security in FTP, security for a file transfer protocol client is integral to its operation so that the user's activity is safe from prying eyes. A number of additional security techniques have been devised for use with FTP over the years, such as the client either explicitly naming a security protocol to use or one being automatically implied. Other clients attempt to use FTP by way of a secure shell (SSH) tunnel, which may have difficulties due to the fleeting nature of the data connection.