FTP Error Codes Reference

Understand and troubleshoot FTP reply codes. Browse preliminary replies, success responses, intermediate replies, transient failures, and permanent rejections with step-by-step fix guides.
5xx Permanent Failures
Permanent failures indicate the command will not succeed and the client should not retry with the same parameters. These require correcting the command syntax, file permissions, credentials, or server configuration.

Syntax Error, Command Unrecognized
The server did not recognize the FTP command. It may be misspelled, malformed, or unsupported.

Syntax Error in Parameters
The FTP command was recognized but the parameters or arguments are invalid.

Command Not Implemented
The FTP server recognized the command but has not implemented it or has disabled it.

Bad Sequence of Commands
The FTP commands were sent in the wrong order. The server requires a specific command sequence.

Command Not Implemented for That Parameter
The command is recognized but a specific parameter value is not supported.

Not Logged In
The user is not logged in. Authentication is required before this command can be executed.

Need Account for Storing Files
The server requires an ACCT command before files can be stored or uploaded.

Requested Action Not Taken, File Unavailable
The file or directory operation failed. The path does not exist, or access is denied.

Requested Action Aborted, Page Type Unknown
The server cannot process the request because the page structure type is unknown.

Requested File Action Aborted, Storage Allocation Exceeded
The file operation was rejected because it exceeds the storage limit or allocation.

Requested Action Not Taken, File Name Not Allowed
The filename or path is not allowed by the server's naming rules or access policy.
4xx Transient Failures
Transient failures mean the server cannot process the request right now but the condition may change. The client should retry after a delay. These include connection issues, file locks, and storage limitations.

Service Not Available, Closing Control Connection
The FTP server is unavailable and is closing the connection. The client should retry later.

Can't Open Data Connection
The server could not establish the data connection needed for the file transfer.

Connection Closed, Transfer Aborted
The data connection was closed unexpectedly and the file transfer was aborted.

Requested File Action Not Taken
The file operation was not completed because the file is temporarily unavailable.

Requested Action Aborted, Local Error
The server encountered an internal error while processing the command. The client should retry later.

Insufficient Storage Space
The server does not have enough disk space to complete the file operation.
3xx Intermediate Responses
Intermediate responses indicate the server needs more information before completing the action. These appear during authentication (needing a password) and multi-step operations (file rename, transfer resume).

User Name Okay, Need Password
The username was accepted. The server is now waiting for the password.

Need Account for Login
The server requires an account name (ACCT command) in addition to the username and password.

Requested File Action Pending Further Information
The server is waiting for additional information to complete the requested action.
2xx Success Responses
Success responses confirm that the command was processed and completed. These include login confirmations, file operation completions, transfer completions, and mode changes.

Command Okay
The FTP command was understood and executed successfully.

System Status
The server is reporting its system status or listing supported features.

File Status
The server is reporting the status or size of the specified file.

Help Message
The server is providing help text about available commands or usage instructions.

NAME System Type
The server is reporting its operating system type in response to a SYST command.

Service Ready for New User
The FTP server is ready and accepting connections. This is the greeting banner sent upon connection.

Service Closing Control Connection
The server is closing the FTP control connection in response to a QUIT command.

Data Connection Open, No Transfer in Progress
The data connection is open but no file transfer is currently active.

Closing Data Connection, Transfer Complete
The file transfer completed successfully and the data connection is being closed.

Entering Passive Mode
The server is entering passive mode and has provided the IP and port for the data connection.

Entering Extended Passive Mode
The server is entering extended passive mode and has provided the port for the data connection.

User Logged In
Authentication successful. The user is now logged in and can access the server.

AUTH TLS Successful
The server accepted the AUTH TLS command and the connection is being upgraded to TLS encryption.

Requested File Action Okay
The file or directory operation was completed successfully.

Pathname Created
The directory was created or the current directory path is being returned.
1xx Preliminary Replies
Preliminary replies indicate that the command was accepted and the action is starting. The client should expect another reply before sending a new command. These typically appear at the beginning of file transfers.

Restart Marker Reply
The server is sending a restart marker to help resume an interrupted file transfer.

Service Ready in nnn Minutes
The FTP server is not ready yet but will be available shortly. The client should wait and retry.

Data Connection Already Open, Transfer Starting
The data connection is already established and the file transfer is beginning immediately.

File Status Okay, About to Open Data Connection
The server is ready to transfer the file and is about to open the data connection.
How an FTP Session Works
FTP (File Transfer Protocol) uses two separate TCP connections: a control connection for commands and responses, and a data connection for file transfers and directory listings. Understanding this dual-connection architecture is key to diagnosing FTP errors.
The client opens a TCP connection to the FTP server on port 21. The server responds with a 220 greeting banner containing its hostname and software version.
The client sends USER with the username (server responds 331), then PASS with the password. A 230 response confirms successful login. For anonymous access, use USER anonymous.
The client queries server capabilities with FEAT, sets transfer type with TYPE I (binary) or TYPE A (ASCII), and identifies the OS with SYST. These configure the session for correct file handling.
Before any transfer, the client sets up the data channel. In passive mode (PASV/EPSV), the server opens a port and the client connects to it. In active mode (PORT), the client opens a port and the server connects back.
The client sends RETR (download) or STOR (upload) with the filename. The server responds 150 (opening data connection), transfers the data, then sends 226 (transfer complete) when finished.
The client sends QUIT, the server responds with 221, and the control connection is closed. Ensure all transfers are complete before disconnecting.
Each step returns a specific FTP reply code. When something fails, the code tells you exactly which step broke down and whether the failure is temporary (4xx) or permanent (5xx). If the initial connection fails, use the Port Scanner to check if port 21 is open, and the DNS Inspector to verify the server hostname resolves correctly.
Active Mode vs Passive Mode
The most common source of FTP errors (especially 425 “Can't open data connection”) is the mismatch between active and passive mode and firewall rules. Understanding the difference is essential for FTP troubleshooting.
Active Mode (PORT)
The client sends a PORT command with its IP and a port number. The server then initiates a connection from its port 20 to the client's specified port. This fails through firewalls and NAT because most networks block inbound connections to client machines. Active mode is legacy and should be avoided unless both sides are on the same LAN.
Passive Mode (PASV/EPSV)
The client sends PASV (or EPSV for IPv6), and the server responds with an IP and port to connect to. The client then initiates a connection to the server's data port. This works through firewalls and NAT because the client only makes outbound connections. The server must have a range of passive ports open in its firewall.
If you see error 425, switch to passive mode. If PASV returns a private IP (the server is behind NAT), use EPSV instead — it only returns the port, and the client connects to the same IP used for the control connection.
FTP vs SFTP vs FTPS
Choosing the right file transfer protocol matters for security. Plain FTP is unencrypted — credentials and file data are sent in cleartext. Modern deployments should use FTPS or SFTP.
FTP (Port 21)
The original protocol (RFC 959). No encryption — passwords, commands, and file data are all in plaintext. Vulnerable to eavesdropping and credential theft. Should only be used on trusted networks or for public anonymous downloads.
FTPS (Port 21 or 990)
FTP with TLS/SSL encryption. Explicit FTPS starts on port 21 and upgrades via AUTH TLS (code 234). Implicit FTPS connects to port 990 with TLS from the start. Uses the same FTP reply codes. Requires certificate management.
SFTP (Port 22)
A completely different protocol running over SSH. Not related to FTP despite the name. Single connection (no separate data channel), built-in encryption, key-based auth. Does not use FTP reply codes. Generally the simplest and most secure option.
For new deployments, SFTP is recommended because it uses a single connection (no firewall/NAT issues), provides strong encryption, and supports key-based authentication. Use FTPS when you need compatibility with existing FTP workflows and infrastructure.
Troubleshoot FTP Errors with Free Tools
Diagnose FTP connectivity and DNS issues with these free diagnostic tools.
Related Error Code References
FTP errors often overlap with HTTP status codes (similar numbering scheme), SSL/TLS issues (for FTPS connections), and server log analysis.