Reading — step 1 of 5
Read
~1 min readFTP Basics
FTP — File Transfer Protocol
FTP (RFC 959, 1985) is one of the oldest internet protocols. Designed for transferring files between machines.
Architecture:
Client Server
| |
| Control connection (port 21) |
|<------------------------------>|
| Commands + responses |
| |
| Data connection (port 20 or |
| ephemeral port) |
|<------------------------------>|
| File contents |
Two TCP connections per session:
- Control: persistent, text-based commands.
- Data: per file/listing transfer; opened, transfer, closed.
Why two? FTP designed when networks were slow and packet-switched: control bytes shouldn't get stuck behind data.
Modern verdict: FTP is largely deprecated for new deployments. Reasons:
- Unencrypted by default (FTPS adds TLS, but messy).
- Two ports = firewall + NAT nightmares.
- Complex protocol (active vs passive modes).
- Modern alternatives: SFTP (SSH-based), HTTPS upload, S3 pre-signed URLs.
Still in use:
- Legacy systems (mainframes, embedded).
- File distribution (sftp.gnu.org, kernel.org).
- IoT firmware updates.
- Some ISPs use FTP for log delivery.
Real implementations:
- vsftpd (Very Secure FTP Daemon).
- Pure-FTPd.
- ProFTPD.
- FileZilla Server.
- IIS FTP (Microsoft).
We'll build a basic FTP server, then discuss FTPS, SFTP, and modern alternatives.
Discussion
Ask a question, share an insight, or help someone who’s stuck.
Sign in to post a comment or reply.
Loading…