wire / wire-format / ftp-protocol

FTP (File Transfer Protocol)

FTP is a client-server protocol for file transfer. Control connection (port 21, text commands): USER, PASS, CWD, PWD, LIST, RETR, STOR, DELE, MKD, RMD, QUIT, PASV, PORT, TYPE, MODE, STRU. Data connection (port 20 or passive port): transfers file data. Two modes: active (server connects to client) and passive (client connects to server).

wire-format kind wire-format status standard verification verified tier B wire-format@1

aka: FTP (File Transfer Protocol)

wire format

spec: RFC 959

FTP is a client-server protocol for file transfer. Control connection (port 21, text commands): USER, PASS, CWD, PWD, LIST, RETR, STOR, DELE, MKD, RMD, QUIT, PASV, PORT, TYPE, MODE, STRU. Data connection (port 20 or passive port): transfers file data. Two modes: active (server connects to client) and passive (client connects to server).

fieldsizemeaning
Control connectionTCP port 21Text-based command/response. Commands: USER, PASS, CWD, PWD, LIST, RETR, STOR, DELE, MKD, RMD, QUIT, PASV, PORT, TYPE (A/I), MODE (S/B/C), STRU (F/R/P).
Data connectionTCP port 20 (active) or passiveTransfers file data. Active: server connects to client's port. Passive: client connects to server's port (PASV response gives IP+port).
Response codes3 digits1xx preliminary, 2xx success, 3xx intermediate, 4xx transient error, 5xx permanent error. E.g., 220 (service ready), 230 (logged in), 226 (transfer complete), 530 (not logged in).
Transfer typesconfigTYPE A (ASCII, converts line endings), TYPE I (Image/binary, no conversion).
Passive modePASVClient sends PASV; server responds with IP and port (h1,h2,h3,h4,p1,p2). Client connects to that address.

example:

00 00

FTP (placeholder)


provenance

agent: curl -H 'accept: application/json' wire.phall.io/wire-format/ftp-protocol or /wire-format/ftp-protocol.json