Skip to main content

IV.B FTP Replies

The server sends FTP replies over the TELNET connection in response to user FTP commands. The FTP replies constitute the acknowledgment or completion code (including errors). The FTP-server replies are formatted for human or program interpretation. Single line replies consist of a leading three-digit numeric code followed by a space, followed by a one-line text explanation of the code. For replies that contain several lines of text, the first line will have a leading three-digit numeric code followed immediately by the ASCII character "-" (Hyphen, Code 55 (octal)) and possibly some text. All succeeding continuation lines except the last are constrained not to begin with three digits; the last line must repeat the numeric code of the first line and be followed immediately by a space.

For example:

100-First Line
Continuation Line
Another Line
100 Last Line

The numeric codes are assigned by groups and for ease of interpretation by programs in a manner consistent with other protocols such as the RJE protocol. The three digits of the code are to be interpreted as follows:

a) The first digit specifies type of response as indicated below:

000 These replies are purely informative and constitute neither a
positive nor a negative acknowledgment.

1xx Informative replies to status inquiries. These constitute a
positive acknowledgment to the status command.

2xx Positive acknowledgment of previous command or other success-
ful action.

3xx Incomplete information. Activity cannot proceed without
further specification and input.

4xx Unsuccessful reply. The request is correctly specified but
the server is unsuccessful in correctly fulfilling it.

5xx Incorrect or illegal command. The command or its parameters
were invalid or incomplete from a syntactic viewpoint, or the
command is inconsistent with a previous command. The command
in question has been completely ignored.

6xx-9xx Reserved for future expansion.

b) The second digit specifies the general category to which the response refers:

x00-x29 General purpose replies, not assignable to other
categories.

x30 Primary access. Informative replies to the "log-on" attempt.

x40 Secondary access. The primary server is commenting on its
ability to access a secondary service.

x5x FTP results

x6x RJE results.

x7x-x9x Reserved for future expansion.

c) The final digit specifies a particular message type. Since the code is designed for an automation process to interpret, it is not necessary for every variation of a reply to have a unique number. Only the basic meaning of replies need have unique numbers. The text of a reply can explain the specific reason for that reply to a human user.

Each TELNET line delimited by a numeric code and CRLF (or group of text lines bounded by coded lines) that is sent by the server is intended to be a complete reply message. It should be noted that the text of replies is intended for a human user. Only the reply codes and in some instances the first line of text are intended for programs.

The assigned reply codes relating to FTP are:

000 General information message (site, time of day, etc.).
010 Message from system operator.
030 Server availability information.
050 FTP commentary or user information.
100 System status reply.
110 System busy doing...
150 File status reply
151 Directory listing reply.
200 Last command received correctly.
201 An ABORT has terminated activity, as requested.
202 Abort request ignored, no activity in progress.
230 User is "logged in". May proceed.
231 User is "logged out". Service terminated.
232 Logout command noted, will complete when transfer done.
233 User is "logged out". Parameters reinitialized.
250 FTP file transfer started correctly.
251 FTP Restart-marker reply.

    Text is : MARK yyyy = mmmm
    where yyyy is user's data stream marker (yours)
    and mmmm is server's equivalent marker (mine)
    (Note the spaces between the markers and '=')

252 FTP transfer completed correctly.
253 Rename completed.
254 Delete completed.
255 FTP server data socket reply

    Text is: SOCK nnnn
    where nnnn is a decimal integer representing
    the server socket for data connection

256 Mail completed.
300 Connection greeting message, awaiting input.
301 Current command incompleted (no CRLF for long time).
330 Enter password
331 Enter account (if account required as part of login
    sequence).
350 Enter mail, terminate by a line with only a '.'
400 This service not implemented.
401 This service not accepting user now, goodbye.
430 Log-on time or tries exceeded, goodbye.
431 Log-on unsuccessful.  Usre and/or password invalid.
432 User not valid for this service.
433 Cannot transfer files without valid account.  Enter account.
434 Log-out forced by operator action.  Phone site.
435 Log-out forced by system problem.
436 Service shutting down, goodbye.
450 FTP: File not found.
451 FTP: File access denied to you.
452 FTP: File transfer incomplete, data connection closed.
453 FTP: File transfer incomplete, insufficient storage space.
454 FTP: Cannot connect to your data socket.
455 FTP: File system error not covered by other reply codes.
456 FTP: Name duplication rename failed.
457 FTP: Transfer parameters in error.
500 Last command line completely unrecognized.
501 Syntax of last command is incorrect.
502 Last command incomplete, parameters missing.
123456789012345678901234567890123456789012345678901234567890123456789012
503 Last command invalid (ignored), illegal parameter combination.
504 Last command invalid, action not possible at this time.
505 Last command conflicts illegally with previous command(s).
506 Requested action not implemented by the server.
507 Catchall error reply.
550 Bad pathname specification (e.g., syntax error).