FTP Protocol: History, Mechanics, and Security Evolution
The File Transfer Protocol (FTP) is a foundational communication protocol used to transfer files between a client and a server over a network. Since its inception in the early 1970s, it has played a critical role in the development of digital data exchange, evolving from early network predecessors to the complex, multi-mode system used in modern computing.
While once a staple of web browsing, the protocol has undergone significant changes due to the rise of more secure alternatives. Understanding how FTP functions, its various modes of operation, and its inherent security limitations is essential for anyone working with network communications.

Key Facts
- Original Developer: Abhay Bhushan (published as RFC 114).
- Initial Release: April 16, 1971.
- Current Specification: RFC 959 (October 1985).
- OSI Layer: Application layer.
- Standard Ports: Port 21 for control; Port 20 for data transfer.
- Primary Modes: Active and Passive.
The History of FTP
The origins of FTP date back to April 16, 1971, when Abhay Bhushan published the original specification as RFC 114. In its earliest years, FTP operated on NCP (Network Control Program), which was the predecessor to the modern TCP/IP suite. As networking evolved, the protocol transitioned to TCP/IP via RFC 765 in 1980, eventually leading to the current standard, RFC 959, published in October 1985.
Over the decades, several amendments have been proposed to improve the protocol. These include RFC 1579 (1994) for firewall-friendly passive mode, RFC 2228 (1997) for security extensions, and RFC 2428 (1998) to provide support for IPv6 and extended passive modes.

How FTP Communication Works
FTP utilizes a dual-channel approach to manage communication. It separates the commands used to control the session from the actual movement of file data.
Control and Data Connections
The control connection is used to send commands and receive status codes. The server responds to these commands using three-digit ASCII status codes. For instance, a code starting with "2" (e.g., 200 OK) indicates success, while codes starting with "4" or "5" indicate failure.

The data connection is a separate channel used specifically for the transfer of file content. The way this connection is established depends on whether the protocol is running in active or passive mode.
Active vs. Passive Mode
In active mode, the client listens on a specific port and sends a PORT command to the server. The server then initiates the data connection from its port 20 to the client's specified port. Conversely, in passive mode, the server opens a port and the client initiates the connection, which is often more effective for traversing firewalls and NAT (Network Address Translation) devices.

Data Types and File Structures
FTP supports various ways to represent and organize data to ensure compatibility between different types of computer systems.
Data Types (Modes)
- ASCII (TYPE A): Used for text files. The protocol handles character conversion between the sender and receiver.
- Local (TYPE L): Designed for non-8-bit systems (e.g., 36-bit systems), though most modern clients only support 8-bit transfers.
- Unicode (TYPE U): Supports UTF-8 text files, though this was defined in an Internet Draft rather than a formal RFC.
File Structures
The STRU command defines how files are organized. The three primary structures are:
- File (F): A stream-oriented sequence of bytes, common in Unix and Windows systems.
- Record (R): A record-oriented structure common in mainframe systems.
- Page (P): A page-oriented structure designed for TENEX systems (now largely deprecated).
Security Considerations and Modern Alternatives
A significant drawback of standard FTP is that it was not designed with modern security in mind. It is vulnerable to several types of attacks, including brute-force attacks, packet capture (where data is intercepted in plain text), spoofing, and DoS (Denial of Service) attacks.
To mitigate these risks, users typically turn to more secure protocols:
- FTPS: An extension of FTP that adds support for TLS/SSL encryption.
- SFTP (SSH File Transfer Protocol): A completely different protocol that runs over an SSH (Secure Shell) connection, providing robust encryption and integrity.
Note that while "FTP over SSH" exists as a method of tunneling, it is distinct from the standard SFTP protocol.

Protocol Comparison Summary
| Protocol | Security Level | Primary Use Case |
|---|---|---|
| FTP | Low (Plaintext) | Legacy systems and simple internal transfers |
| FTPS | High (TLS/SSL) | Secure extensions of the standard FTP protocol |
| SFTP | High (SSH) | Secure, encrypted file transfers over SSH |
| TFTP | Very Low | Simple booting processes via local networks |
Frequently Asked Questions
Why did Google Chrome and Firefox drop FTP support?
Major browser vendors like Google and Mozilla removed FTP support because the protocol has been superseded by more secure methods like SFTP and FTPS. Standard FTP transmits data in plaintext, making it a security risk.
What is the difference between active and passive FTP?
The difference lies in which party initiates the data connection. In active mode, the server connects to the client. In passive mode, the client connects to the server, which is generally more compatible with modern firewalls.
Is SFTP the same as FTP over SSH?
No. While both use SSH for security, SFTP is a distinct protocol. FTP over SSH refers to the practice of tunneling a standard FTP session through an SSH connection, which can be complex due to FTP's use of multiple ports.
What are the standard ports for FTP?
FTP uses port 21 for the control connection (sending commands) and port 20 for the data connection (transferring files).
What is TFTP?
Trivial File Transfer Protocol (TFTP) is a simplified, lock-step version of FTP. It is much easier to implement and is often used for booting devices over a local area network, though it lacks the advanced features and security of standard FTP.