Zum Hauptinhalt springen

FTP-Antworten

IV.B FTP-Antworten​

Der Server sendet FTP-Antworten als Reaktion auf FTP-Befehle über die TELNET-Verbindungen an den Benutzer. Die FTP-Antworten bilden die Bestätigung bzw. den Abschlusscode (einschließlich Fehlern). Die Antworten des FTP-Servers sind für die Interpretation durch Menschen oder Programme formatiert. Die Antworten bestehen aus einem führenden dreistelligen numerischen Code, gefolgt von einem Leerzeichen und einer textlichen Erläuterung des Codes. Die numerischen Codes werden gruppenweise vergeben, um die Interpretation durch Programme zu erleichtern, und zwar in einer Weise, die mit anderen Protokollen wie dem RJE-Protokoll übereinstimmt. Die drei Ziffern des Codes sind wie folgt zu interpretieren:

a) Die erste Ziffer gibt die Art der Antwort an, wie unten dargestellt:

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

1xx informative replies to status inrequiries. These constitute
a positive acknowledgment to the status command.

2xx Positive acknowledgment of previous command or other
successful 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 corretly fulfilling
it.

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

6xx - 9xx Reserved for future expansion.

b) Die zweite Ziffer gibt die allgemeine Kategorie an, auf die sich die Antwort bezieht:

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

x7x-x9x Reserved for future expansion.

c) Die letzte Ziffer gibt einen bestimmten Nachrichtentyp an. Da der Code für die Interpretation durch einen automatischen Prozess entworfen ist, ist es nicht notwendig, dass jede Variante einer Antwort eine eindeutige Nummer hat. Nur die Grundbedeutung der Antworten braucht eindeutige Nummern. Der Text einer Antwort kann einem menschlichen Benutzer den konkreten Grund für diese Antwort erläutern.

Jede TELNET-Zeile (durch CRLF beendet) vom Server soll eine vollständige Antwortnachricht sein. Wenn es nötig ist, den Text einer Antwort auf folgenden Zeilen fortzusetzen, enthalten diese Fortsetzungsantworten den speziellen Antwortcode aus drei Leerzeichen. Es ist zu beachten, dass der Text der Antworten für einen menschlichen Benutzer bestimmt ist. Nur die Antwortcodes und in einigen Fällen die erste Textzeile sind für Programme bestimmt.

Die vergebenen Antwortcodes für FTP lauten:

000 General information message (site, time of day, etc.)
030 Server availibility information.
050 FTP commentary or user information.
100 System status reply.
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.
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 decimal integer representing
          the server socket for data connection.
300 Connection greeting message, awaiting input.
301 Current command incomplete (no CRLF for long time).
330 Enter password (may be sent with hide-your-input).
400 This service not implemented.
401 This service not accepting users now, goodbye.
430 Log-on time or tries exceeded, goodbye.
431 Log-on unsuccessful. User and/or password invalid.
432 User not valid for this service.
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.
500 Last command line completely unrecognized.
501 Syntax of last command in incorrect.
502 Last command incomplete, parameters missing.
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.