Skip to main content
DNS Checker(beta)

FTP Error Codes Reference

FTP Error Codes Reference: every FTP status code (1xx-5xx) with causes and fixes.

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.

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.

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).

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.

200info

Command Okay

The FTP command was understood and executed successfully.

211info

System Status

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

213info

File Status

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

214info

Help Message

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

215info

NAME System Type

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

220info

Service Ready for New User

The FTP server is ready and accepting connections. This is the greeting banner sent upon connection.

221info

Service Closing Control Connection

The server is closing the FTP control connection in response to a QUIT command.

225info

Data Connection Open, No Transfer in Progress

The data connection is open but no file transfer is currently active.

226info

Closing Data Connection, Transfer Complete

The file transfer completed successfully and the data connection is being closed.

227info

Entering Passive Mode

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

229info

Entering Extended Passive Mode

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

230info

User Logged In

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

234info

AUTH TLS Successful

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

250info

Requested File Action Okay

The file or directory operation was completed successfully.

257info

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.

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.

1
TCP connection and greeting (220)

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.

2
Authentication (USER/PASS → 230)

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.

3
Session configuration (TYPE, FEAT, SYST)

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.

4
Data connection setup (PASV/EPSV or PORT)

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.

5
File transfer (RETR/STOR → 150 → 226)

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.

6
Session end (QUIT → 221)

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.

Frequently Asked Questions