FTP Server Return Codes

What Is An FTP Server Return Code?

FTP server return codes are sent from the FTP server to the requesting device to let the requesting device know where the connection stands. The FTP server is relaying to the requesting device where the connection process is and what to do next.

FTP server return codes are three digits long. The first digit indicates whether the response is ok, not ok, or incomplete. The second digit represents function grouping. The third digit gives a more specific meaning of the function group specified in the second digit.

The most common FTP codes are listed below. For a master list of FTP codes and commands, please visit The Internet Engineering Task Force (IETF®), who are responsible for setting and maintaining the FTP server return codes.

FTP Server Return Codes

1nn - The requested action is being initiated; expect another reply before proceeding with a new command.
2nn - The requested action has been successfully completed.
3nn - The command has been accepted, but the requested action is pending receipt of further information.
4nn - The command was not accepted (Temporary).
5nn - The command was not accepted (Permanent).

n0n - Syntax
n1n - Information
n2n - Connection
n3n - Authentication
n4n - Not Specified
n5n - File System

150 - File status okay

200 - Command okay
202 - Command not implemented
212 - Directoy status
213 - File status
214 - Help message
220 - Service ready for new user
225 - Data connection open
226 - Closing data connection
227 - Entering passive mode
230 - User logged in
250 - Requested file action okay

331 - User name ok, need password
332 - Need account for login

421 - Service not available (most likely temporary)
425 - Can't open data connection
426 - Connection closed, transfer aborted

500 - Syntax error, command unrecognized
501 - Syntax error in parameters or arguments
503 - Bad sequence of commands
530 - User not logged in