File Transfer Protocol is a standard network protocol used to exchange and manipulate files over a TCP/IP-based network, such as the Internet. FTP is built on client-server architecture and utilizes separate control and data connections between the client and server applications.
Features of FTP
1. Data representation:
   ·    FTP handles three types of data representations-ASCII (7 bit), EBCDIC (8-bit) and 8- binary data.
   ·    The ASCII file is the default format for transferring text files. Each character is encoded using 7-bit ASCII.
   ·    The sender transforms the file from its own representation into ASCII characters and the receiver transforms the ASCII character   to its own representation.
   ·    The image file is the default format for transferring binary files. The file is sent as continuous streams of bits without any    interpretation or encoding.
   1.      File organization and Data structures
·        FTP supports both unstructured and structured file.
·        An unstructured file contains string of bytes and is enl-marked by EOF (End of file). The data structure that corresponds to such a file is called file structure.
·        A structured file contains a list of records and each record is delimited by EDR (End of Record). The data structure of such file is called record structure i.e. file is divided into records.
·        Another structured file contains pages, with each page having a page number and a page header. The pages can be stored and accessed randomly or sequentially. The corresponding data structure is called page structure i.e. file is divided into pages.
   2.      Transmission modes
   ·        FTP can transfer a file by using one of the following three modes:
a)Â Â Â Â Â Stream mode
·        It is the default mode.
·        File is transmitted as continuous stream of bytes to TCP.
·        TCP is responsible for chopping data into segments of appropriate size.
b)Â Â Â Â Â Block mode
·        Data is delivered from FTP to TCP in blocks.
·        Each block is preceded by 3 bytes header.
·        The first byte is called the block descriptor.
·        The second and third byte defines the size of the block in bytes.
c)Â Â Â Â Â Â Compressed mode
·        Data is usually compressed if the file to be transmitted is very big.
·        The compression method normally used in Run-length encoding.
·        In a text file, usually spaces (blanks) are removed. In a binary file, null characters are compressed.
d)Â Â Â Â Â Error control
·        Since TCP is used for data transfer no additional error recovery mechanism is required.
e)Â Â Â Â Â Access control
·        File access protection is done using login procedure with login name and password.
FTP Mechanism
• FTP uses client/server model for communication.
• Two TCP connections are used for file transfer.
• On one connection control signals (commands and responses) are exchanged and the other connection is used for actual data transfer. These two connections are called control connection and data connection respectively.