106 | The Basics of Basics — Introduction to FTP
Published on September 23, 2025
The Basics of Basics — Introduction to FTP
Introduction
When it comes to file transfer over a network, the first thing that comes to mind is FTP (File Transfer Protocol) — one of the oldest and most fundamental internet protocols. Despite its age, it’s still in use and serves as a starting point for understanding more complex systems.
What is FTP?
FTP (File Transfer Protocol) is a protocol designed for transferring files between computers on a network. It works on the client–server model:
- FTP server — a computer that stores files and waits for requests from clients.
- FTP client — a program (for example, FileZilla, WinSCP, or even a web browser) that connects to the server to download or upload files.
How does FTP work? Two channels — the key to understanding
The unique feature of FTP is that it uses two separate connections (channels):
Control Connection
- Established when the client connects to port
21
of the server. - All commands are transmitted through it: login, password, file listing requests, upload and download commands.
- Remains active throughout the entire session.
- Established when the client connects to port
Data Connection
- Created every time a file or a list of files needs to be transferred.
- Data “flows” through it.
- Closes after the transfer is complete.
Active vs. Passive Mode
Active Mode
- The client connects from a random port (e.g., 1030) to the server’s port
21
. - The client tells the server: “I’ll be listening on my port 1031 for data.”
- The server, from its port
20
, initiates a connection to the client’s port.
Downside: doesn’t work well behind NAT or firewalls, as they block incoming connections.
Passive Mode
- The client connects to the server’s port
21
. - The client sends the
PASV
command. - The server replies: “Connect to me on port 5005.”
- The client then initiates the connection to the specified server port.
Advantage: solves the problem with firewalls and NAT, used by default.
The main drawback of FTP
FTP has a critical vulnerability: all data, including logins and passwords, is transmitted in plain text. Anyone intercepting the traffic can easily read your credentials.
⚠️ Conclusion: FTP is the “grandfather” of modern protocols. It’s important for understanding, but for secure data transfer it’s better to use its successors — FTPS and SFTP, which we’ll cover in the next article.