提案する NETRJE の応答コード
このプロトコルの応答コードは、RFC 640 で新しい FTP 仕様のために提案されたモデルに従う。念のため、その RFC から関連する情報をここに挿入する。
応答コードの第 1 桁には五つの値がある。
1yz 肯定的予備応答 (Positive Preliminary reply)
要求された動作が開始されつつある。新しいコマンドへ進む前に、別の応答を待つこと。(完了応答の前に利用者プロセスが別のコマンドを送ることはプロトコル違反となるが、サーバ FTP プロセスは、先行するコマンドの処理中に到着したコマンドをキューに入れるべきである。) 同時監視が困難な実装では、この種の応答を用いて、コマンドが受理されたこと、および利用者プロセスがデータ・コネクションに注意を払ってよいことを示すことができる。
2yz 肯定的完了応答 (Positive Completion reply)
要求された動作は正常に完了した。新しい要求を開始してよい。
3yz 肯定的中間応答 (Positive Intermediate reply)
コマンドは受理されたが、要求された動作は、さらなる情報の受信を待って保留されている。利用者は、この情報を指定する別のコマンドを送るべきである。この応答はコマンド系列グループで用いられる。
4yz 一時的否定完了応答 (Transient Negative Completion reply)
コマンドは受理されず、要求された動作は行われなかったが、エラー状態は一時的であり、その動作を再び要求してよい。利用者は、(もしあれば) コマンド系列の先頭に戻るべきである。「一時的」に意味を割り当てるのは難しく、特に二つの別々のサイト (サーバと利用者プロセス) がその解釈に合意しなければならない場合はなおさらである。4yz の各応答はそれぞれ多少異なる時間値を持つかもしれないが、意図は、利用者プロセスが再試行するよう促されることである。応答が 4yz と 5yz (恒久的否定) のどちらの区分に入るかを判断する経験則は、コマンドの形式や、利用者またはサーバの特性に何の変更も加えずにコマンドを繰り返せる場合 (たとえば、コマンドが同じ綴りで同じ引数で用いられ、利用者がファイル・アクセスやユーザ名を変えず、サーバが新しい実装を立ち上げない場合) には、その応答は 4yz である、というものである。
5yz 恒久的否定完了応答 (Permanent Negative Completion reply)
コマンドは受理されず、要求された動作は行われなかった。利用者プロセスは、(同じ系列で) まったく同じ要求を繰り返さないことが望ましい。「恒久的」なエラー状態の中にも訂正できるものがあるため、人間の利用者は、将来のある時点で (たとえば、綴りが修正された後や、利用者がディレクトリの状態を変更した後に)、直接の操作によって利用者プロセスにコマンド系列を再開させたいと思うかもしれない。
第 2 桁には、次の機能分類が符号化される。
x0z 構文 (Syntax) - これらの応答は、構文エラー、どの機能区分にも当てはまらない構文的に正しいコマンド、および未実装または余分なコマンドに関するものである。
x1z 情報 (Information) - これらは、状態やヘルプなどの情報要求に対する応答である。
x2z 接続 (Connection) - Telnet およびデータ・コネクションに関する応答。
x3z 認証と課金 (Authentication and accounting) - ログオン処理および課金手続に関する応答。
x4z 未定。
x5z ファイル・システム (File system) - これらの応答は、要求された転送やその他のファイル・システム動作に対するサーバ・ファイル・システムの状態を示す。
第 3 桁は、第 2 桁で指定された各機能区分の中で、意味のより細かな段階を与える。以下の応答の一覧がこれを例示する。各応答に付随するテキストは、強制ではなく示唆であり、関連づけられるコマンドによって変わることさえあることに注意されたい。一方、応答コードは仕様に厳密に従うべきである。すなわち、サーバの実装は、ここに記述されたものとわずかに異なるだけの状況のために新しいコードを考案すべきではなく、すでに定義されたコードを適応させるべきである。
以下に、応答コード順に並べた応答の一覧を示す。RJE のためにいくつかの新しい応答が追加されており、読者の便宜のためアスタリスクで示してある。この一覧の後には、各コマンドについて可能な応答を挙げたコマンド一覧が続く。この一覧は完全でも最終的でもないと考えられており、例によって意見を歓迎する。
110 Restart marker reply,
In this case the text is exact and not left to the particular
implementation; it must read:
MARK yyyy = mmmm
where yyyy is user-process data stream marker, and mmmm is Server's
equivalent marker. (Note the spaces between the markers and "=".)
120 Service ready in nnn minutes
125 Data connection already open; transfer starting
150 File status okay; about to open data connection
200 Command okay
202 Command not implemented, superfluous at this site
211 System status, or system help reply
212 Directory status
213 File status
214 Help message (on how to use the server or the meaning of a
particular non-standard command. This reply is useful only to the human
user.)
*215 RJE general status reply
*216 job status reply
*217 RJE user's jobs status reply
220 Service ready for new user
221 Service closing TELNET connecton (logged off if appropriate)
225 Data connection open; no transfer in progress
226 Closing data connection; requested file action successful (for
example, file transfer or file abort.)
227 Entering [passive, active] mode
230 User logged in
250 Requested file action okay, completed
*260 Job <job-id> has completed
*261 Output ready. Type an empty line when ready
*262 Job <job-id> IS ALLOCATED pathname
*263 Job <job-id> cancelled as requested
*264 Job <job-id> altered as requested to state status
331 User name okay, need password
332 Need account for login
350 Requested file action held in abeyance, pending further information
354 Start mail input; end with CRLF, CRLF
*360 Job <job-id> successfully submitted
421 Service not available, closing Telnet connecton. (This may be a
reply to any command if the service knows it must shut down.)
425 Can't open data connection
426 Connection trouble, closed; transfer aborted
450 Requested file action not taken; file unavailable (e.g., file not
found, no access)
451 Requested action aborted; local error in processing
452 Requested action not taken: insufficient storage space in system
500 Syntax error, command unrecognized (This may include errors such as
command line too long.)
501 Syntax error in parameters or arguments
502 Command not implemented
503 Bad sequence of commands
504 Command not implemented for that parameter
530 Not logged in
532 Need account for storing files
550 Requested action not taken: file unavailable (e.g., file busy)
552 Requested file action aborted: exceeded storage allocation for
current directory or dataset)
553 Requested action not taken: file name not allowed
*563 Job <job-id> is not known to the system
*564 Requested alteration is not permitted for the specified job.