Guide
FTP return codes and SFTP status codes: the complete reference
Every FTP reply code (RFC 959) and SFTP status code (SSH_FX_*) explained, what each digit means, the most common errors like 550 and 530, and why FTP and SFTP codes are not the same thing.
If you run file transfers you’ll eventually stare at a numeric code and need to know what it means. There’s a trap worth clearing up first: FTP and SFTP use completely different code systems, because they’re completely different protocols. Mixing them up is the single most common source of confusion. This page covers both.
- FTP / FTPS uses 3-digit reply codes defined in RFC 959
(e.g.
226,530,550). - SFTP is an SSH subsystem and uses status codes named
SSH_FX_*(e.g.SSH_FX_PERMISSION_DENIED), not numeric FTP codes at all.
How FTP reply codes are structured
Every FTP reply is three digits, and each digit carries meaning.
First digit, did it work?
| Code | Meaning |
|---|---|
| 1xx | Positive preliminary, command accepted, another reply is coming |
| 2xx | Positive completion, command succeeded |
| 3xx | Positive intermediate, accepted, but waiting for more input (e.g. password) |
| 4xx | Transient negative, failed, but try again (temporary) |
| 5xx | Permanent negative, failed, don’t retry as-is |
Second digit, what area?
| Code | Area |
|---|---|
| x0x | Syntax |
| x1x | Information |
| x2x | Connections |
| x3x | Authentication & accounting |
| x4x | Unspecified |
| x5x | File system |
So 550 reads as: permanent failure (5), file-system area (5), “your command was fine, but
the file/path can’t be acted on.”
Common FTP reply codes
| Code | Meaning | What it usually means in practice |
|---|---|---|
| 110 | Restart marker reply | Resuming a transfer |
| 125 | Data connection already open; transfer starting | — |
| 150 | File status OK; about to open data connection | Normal before a transfer |
| 200 | Command OK | Generic success |
| 211 | System status / help reply | Often from FEAT |
| 213 | File status | Often a file’s size or modify time |
| 220 | Service ready for new user | The greeting when you connect |
| 221 | Service closing control connection | Normal QUIT / logout |
| 226 | Closing data connection; transfer successful | Your upload/download completed |
| 227 | Entering Passive Mode | Server gave you a passive data port |
| 229 | Entering Extended Passive Mode | The IPv6-friendly EPSV form |
| 230 | User logged in, proceed | Login succeeded |
| 234 | Security mechanism accepted | FTPS AUTH TLS accepted (RFC 2228) |
| 250 | Requested file action completed | e.g. a DELE or CWD worked |
| 257 | ”PATHNAME” created | Reply to MKD/PWD |
| 331 | User name OK, need password | Send PASS next |
| 332 | Need account for login | Rarely used |
| 350 | Requested action pending further information | e.g. REST before RETR |
| 421 | Service not available, closing control connection | Server shutting down or too busy |
| 425 | Can’t open data connection | Usually a passive/active mode or firewall problem |
| 426 | Connection closed; transfer aborted | The data connection dropped mid-transfer |
| 430 | Invalid username or password | Auth failed |
| 450 | File action not taken (file busy) | Temporary, retry |
| 451 | Action aborted: local error | Server-side error |
| 452 | Insufficient storage | Out of space (temporary) |
| 500 | Syntax error, command unrecognized | The server didn’t understand the command |
| 501 | Syntax error in parameters | Bad arguments |
| 502 | Command not implemented | Server doesn’t support it |
| 503 | Bad sequence of commands | e.g. PASS before USER |
| 504 | Command not implemented for that parameter | — |
| 530 | Not logged in | Authentication required or failed, the classic login error |
| 532 | Need account for storing files | — |
| 534 | Request denied, policy requires SSL | The server wants FTPS, you tried plain FTP |
| 550 | File unavailable (not found / no access) | The most common error, wrong path or permissions |
| 551 | Action aborted: page type unknown | Rare |
| 552 | Exceeded storage allocation | Quota hit |
| 553 | File name not allowed | The name violates a server rule |
The two you’ll see most
- 530 Not logged in, credentials wrong, or you tried an operation before authenticating (or the server requires FTPS and you connected in plain FTP).
- 550 File unavailable, the file or directory doesn’t exist, or your account lacks permission on it. The command was valid; the target is the problem.
SFTP status codes (these are NOT FTP codes)
SFTP runs over SSH and reports results with SSH_FXP_STATUS messages carrying an
SSH_FX_* code. The core set (protocol version 3, the most widely implemented) is:
| Code | Name | Meaning |
|---|---|---|
| 0 | SSH_FX_OK | Success |
| 1 | SSH_FX_EOF | End of file (or no more directory entries) |
| 2 | SSH_FX_NO_SUCH_FILE | Path doesn’t exist |
| 3 | SSH_FX_PERMISSION_DENIED | Not allowed |
| 4 | SSH_FX_FAILURE | Generic failure (the catch-all) |
| 5 | SSH_FX_BAD_MESSAGE | Malformed packet |
| 6 | SSH_FX_NO_CONNECTION | No connection (client-side) |
| 7 | SSH_FX_CONNECTION_LOST | Connection lost (client-side) |
| 8 | SSH_FX_OP_UNSUPPORTED | The server doesn’t support that operation |
Later protocol versions (4–6) add more specific codes, invalid handle, no such path, file already exists, write-protect, quota exceeded, and so on, but many clients and servers negotiate version 3, so the eight above are what you’ll meet most.
Why your SFTP client shows a vaguer error than FTP would
Notice SFTP has a single generic SSH_FX_FAILURE (4) where FTP has many specific 5xx codes.
That’s why an SFTP “permission denied” or “failure” can feel less precise than FTP’s 550
vs 530 vs 553. It’s a protocol difference, not your client misbehaving, and it’s why a
good gateway’s audit log matters: when the protocol code is generic, the server-side log
is where you find what actually happened.
FTP vs SFTP vs FTPS, in one line each
- FTP, the original protocol (RFC 959). Numeric reply codes. Unencrypted.
- FTPS, FTP wrapped in TLS (RFC 4217 / 2228). Same numeric reply codes, encrypted.
- SFTP, a different protocol entirely, running over SSH.
SSH_FX_*status codes, always encrypted.
If you’re choosing between them or just untangling which one you’re actually using, see the rest of our guides, including how to put SFTP in front of your own cloud storage.
Try it on your own bucket
Connect a bucket you already own, Amazon S3, Azure Blob, Google Cloud Storage, or an S3-compatible store, and hand out a clean SFTP endpoint in minutes. Your files stay in your cloud.
Start free