How FTP works
FTP uses two connections: a control connection for commands and a separate data connection for each file. It sends passwords in clear text - use SFTP or FTPS instead.
Layer: Application (OSI layer 7) · Port: 21 (+ data port) · Transport: TCP · Format: Text control + binary data · Standard: RFC 959
FTP packet flow
- FTP Client → Web Server: USER anonymous / PASS ****
- FTP Web Server → Client: 230 Login successful
- FTP Client → Web Server: PASV
- FTP Web Server → Client: 227 Entering Passive Mode (…,195,80)
- FTP Client → Web Server: RETR report.pdf (data connection :50000)
- FTP-DATA Web Server → Client: File bytes 1-1460 …
Other protocols: HTTP · WebSocket · QUIC · SMTP · IMAP · POP3 · SMB · WebRTC · SIP · RTSP · RTMP · MQTT · Modbus · PPPoE