Skip to main content

Reply Handling Complications

A major complaint about the protocol concerns the fact that the writer of an FTP user process must handle a considerable number of special cases merely to determine Whether or not the last command sent was successful. It is admitted that the protocol is well-defined in all the following areas, but it is important to realize that the characteristic "well-defined" is necessary, but hot sufficient; for many reasons, it is very desirable to employ the simplest mechanism that satisfies all the needs. Following is a list of those drawbacks that unduly complicate the flow chart of an FTP user process:

  1. Different commands have different success reply codes. A successful "USER" command, for example, returns a "230", whereas a successful "BYTE" command returns a "200". The stated concept that the first digit would carry this information does not apply, as "100" means success for "STAT", and "200" means success for "SOCK". SOLUTION: specify that any command must return a reply code beginning with some unique digit, such as "2", if successful, and anything other than that digit if not successful. For example this includes changing the success reply for STAT, Perhaps to "200".

  2. Some commands have multiple possible success reply codes, e.g., "USER" and "REIN". It is undesirable for ah FTP user to be required to keep a list of reply codes for each command, all of which mean "command accepted, continue". Again, the stated concept concerning the first digit fails, as "230" and "330" are in truth both acknowledgments to a successful "USER" command. SOLUTION: same as for (9) above. The desire to communicate more specific information than simply "yes" or "no", such as the difficulty that some servers do not need all the login parameters, may be solved by having, for example, "230" mean "PASSWORD ACCEPTED, YOU ARE NOW LOGGED IN", and "237" mean "PASSWORD ACCEPTED, ACCOUNT NOW NEEDED". Given the solution to (4) above, a user process becomes much less interested in the difference between "YOU ARE NOW LOGGED IN" and "ACCOUNT NOW NEEDED". The important point is that the idea of "command accepted" is conveyed by the initial "2, and that finer gradations of meaning can be deduced by the user process, if desired.

  3. The meanings of the various connection greeting reply codes are somewhat inconsistent. "300 connection greeting, awaiting input", if intended as a positive acknowledgments to the ICP, should be a 200-series reply, or if intended to be purely informative, a 000-series reply. If the former, then clearly "020 expected delay" is the corresponding negative acknowledgments, and should be a 400-series reply. It is however unlikely that notification of an expected delay would be of importance to a user Process without knowledge of the length of the delay. SOLUTION.: change "300 connection greeting" to a 000-series reply, perhaps "011" (preferred), or change "300 connection greeting" to a 200-series reply, perhaps "211", and "020 expected delay" to a 400-series reply, perhaps "411".