home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 600s / rfc624.txt < prev    next >
Text File  |  1992-10-14  |  10KB  |  231 lines

  1. Network Working Group                                  Mark Krilanovich (UCSB)
  2. Request for Comments: 624                                  George Gregg (UCSB)
  3. NIC #22054                                            Wayne Hathaway (AMES-67)
  4. references: RFC 542                                        Jim White (SRI-ARC)
  5. obsoletes: RFC 607                                                   Feb  1974
  6.       
  7.                                                            
  8.               Comments on the File Transfer Protocol
  9.  
  10. This document replaces RFC 607, which was inadvertently released
  11. while still in rough draft form. It would be appreciated if RFC 607
  12. were disregarded, and this document considered the accurate statement
  13. of the authors' opinions.
  14.  
  15. There are several aspects of the File Transfer Protocol of RFC
  16. 542 that constitute serious drawbacks. Some of these are quite basic
  17. in nature, and imply substantial design changes; these will be
  18. discussed in a later RFC. Others could be remedied with very little
  19. effort, and this should be done as soon as possible.
  20.  
  21. Following is a list of those problems that can be easily solved,
  22. together with their proposed solutions:
  23.  
  24. 1. Once a server has been set to the state where he is "passive"
  25. with regard to establishment of data connections, there is no
  26. convenient way for the user to make him "active" again. The
  27. "REIN" command accomplishes this, but affects more than just the
  28. desired active/passive state. SOLUTION: define a new command,
  29. with a command verb of "ACTV", to mean that the server is to issue
  30. a CONNECT rather than a LISTEN on the data socket. If the server
  31. is already "active", the command is a no op. "ACTV" is to have
  32. the same reply codes as "PASV".
  33.  
  34. 2. Design of an FTP server or user would be simpler if all
  35. command verbs were the same length. While it is certainly
  36. possible to handle varying length verbs, fixed length string
  37. manipulation is in general easier to write and faster to run than
  38. varying length string manipulation, and it would seem that nothing
  39. is to be gained in this application by allowing varying length
  40. strings. SOLUTION: replace the only three-letter verb, "BYE",
  41. with a four-letter one, such as "QUIT", and constrain future
  42. command verbs to be four letters long.
  43.  
  44. 3. The order of the handshaking elements following a file transfer
  45. command is left unspecified. After sending a STOR command, for
  46. example, a user process has no way of knowing which to wait for
  47. first, the "250 FILE TRANSFER STARTED" reply, or establishment of
  48. the data connection. SOLUTION: specify that the server is to
  49. send a "250" reply before attempting to establish the data
  50. connection. If it is desired to check if the user is logged in,
  51. if the file exists, or if the user is to be allowed access to the
  52. file, these checks must be made before any reply is sent. The
  53. text of the "250" reply would perhaps be more appropriate as "250
  54. OPENING DATA CONNECTION", since it comes before actual data
  55. transfer begins. If the server wishes to send an error reply in
  56. the event that the data connection cannot be opened, it is to be
  57. sent in lieu of the "252 TRANSFER COMPLETE" reply.
  58.  
  59.                                  -1-
  60.  
  61. 4. Some hosts currently send an error reply on receipt of a
  62. command that is unimplemented because it is hot needed (e.g.,
  63. "ACCT" or "ALLO"). Even though the text of the reply indicates
  64. that the command has been ignored, it is obviously impossible for
  65. a user process to know that there is no real "error". SOLUTION:
  66. require that any server that does not support a particular command
  67. because it is not needed in that system must return the success
  68. reply for that command.
  69.  
  70. 5. There is no specified maximum length of a TELNET command line,
  71. TELNET reply line, user name, password, account, or pathname. It
  72. is true that every system implementing an FTP server likely has
  73. different maxima for its own parameters, but it is inconvenient,
  74. at least in some systems, for the writer of an FTP user (which
  75. must converse with many FTP servers) to construct an indefinite
  76. length buffer. Similar difficulties confront the writer of a
  77. server FTP. SOLUTION: specify a maximum length for TELNET
  78. command lines, TELNET replies, user names, passwords, account
  79. numbers, and pathnames. This is to be done after conducting a
  80. Poll of serving sites concerning their individual maxima. If
  81. Network mail is to be included in FTP, the mail text, if sent over
  82. the TELNET connection, is to be subject to the same line length
  83. maximum.
  84.  
  85. 6. The notion of allowing continuation lines to start with
  86. arbitrary text solves a minor problem for a few server FTP
  87. implementors at the expense of creating a major problem for all
  88. user FTP implementors. The logic needed to decode a multi-line
  89. reply is unnecessarily complex, and made an order of magnitude
  90. more so by the fact that multi-line replies arc allowed to be
  91. nested. SOLUTION: assign a unique (numeric) reply code, such as
  92. "009", to be used on all lines of a multi-line reply after the
  93. first. The reply code used for this purpose must begin with "0"
  94. (it cannot be three blanks, for example), so that it will appear
  95. as extraneous to a user process by virtue of the already existing
  96. rules concerning reply code groupings.
  97.  
  98. 7. If it is the case that the above solution to (6) is not
  99. accepted, the fact that the maximum allowed level of nesting is
  100. left unspecified creates a hardship for implementors of user FTPs.
  101. This hardship is somewhat easily solved on a machine that has
  102. hardware stacks, but not so for other machines. SOLUTION: either
  103. disallow nested replies (preferred), or specify a maximum level of
  104. nesting of multi-line replies.
  105.  
  106. 8. The prose descriptions of the meanings of the various reply
  107. codes are in several cases unclear or ambiguous. For example, the
  108. code "020" is explained only as "announcing FTP". It is given as
  109. a reply that can be issued when a server cannot accept input
  110. immediately after an ICP, but its exact meaning is not obvious.
  111. Also. the code "331" is said to mean "ENTER ACCOUNT (if required
  112. as part of login sequence)", but is listed as a possible success
  113. reply for most of the commands. The explanation indicates that it
  114. is only valid in the login sequence, but the command-reply
  115.  
  116.                                  -2-
  117.  
  118. correspondence table implies that it also means, "I can't do that
  119. without an account". SOLUTION: an expanded effort should be made
  120. by those who originated the reply codes to define them more
  121. completely.
  122.  
  123. A major complaint about the protocol concerns the fact that the
  124. writer of an FTP user process must handle a considerable number of
  125. special cases merely to determine Whether or not the last command
  126. sent was successful. It is admitted that the protocol is
  127. well-defined in all the following areas, but it is important to
  128. realize that the characteristic "well-defined" is necessary, but hot
  129. sufficient; for many reasons, it is very desirable to employ the
  130. simplest mechanism that satisfies all the needs. Following is a list
  131. of those drawbacks that unduly complicate the flow chart of an FTP
  132. user process:
  133.  
  134. 9. Different commands have different success reply codes. A
  135. successful "USER" command, for example, returns a "230", whereas a
  136. successful "BYTE" command returns a "200". The stated concept
  137. that the first digit would carry this information does not apply,
  138. as "100" means success for "STAT", and "200" means success for
  139. "SOCK". SOLUTION: specify that any command must return a reply
  140. code beginning with some unique digit, such as "2", if successful,
  141. and anything other than that digit if not successful. For
  142. example this includes changing the success reply for STAT,
  143. Perhaps to "200".
  144.  
  145. 10. Some commands have multiple possible success reply codes,
  146. e.g., "USER" and "REIN". It is undesirable for ah FTP user to be
  147. required to keep a list of reply codes for each command, all of
  148. which mean "command accepted, continue". Again, the stated
  149. concept concerning the first digit fails, as "230" and "330" are
  150. in truth both acknowledgments to a successful "USER" command.
  151. SOLUTION: same as for (9) above. The desire to communicate more
  152. specific information than simply "yes" or "no", such as the
  153. difficulty that some servers do not need all the login parameters,
  154. may be solved by having, for example, "230" mean "PASSWORD
  155. ACCEPTED, YOU ARE NOW LOGGED IN", and "237" mean "PASSWORD
  156. ACCEPTED, ACCOUNT NOW NEEDED". Given the solution to (4) above, a
  157. user process becomes much less interested in the difference
  158. between "YOU ARE NOW LOGGED IN" and "ACCOUNT NOW NEEDED". The
  159. important point is that the idea of "command accepted" is conveyed
  160. by the initial "2, and that finer gradations of meaning can be
  161. deduced by the user process, if desired.
  162.  
  163. 11. The meanings of the various connection greeting reply codes
  164. are somewhat inconsistent. "300 connection greeting, awaiting
  165. input", if intended as a positive acknowledgments to the ICP,
  166. should be a 200-series reply, or if intended to be purely
  167. informative, a 000-series reply. If the former, then clearly "020
  168. expected delay" is the corresponding negative acknowledgments, and
  169. should be a 400-series reply. It is however unlikely that
  170. notification of an expected delay would be of importance to a user
  171. Process without knowledge of the length of the delay. SOLUTION.:
  172. change "300 connection greeting" to a 000-series reply, perhaps
  173.  
  174.                                  -3-
  175.  
  176. "011" (preferred), or change "300 connection greeting" to a
  177. 200-series reply, perhaps "211", and "020 expected delay" to a
  178. 400-series reply, perhaps "411".
  179.  
  180. In addition to the above mentioned weaknesses in the protocol,
  181. the following is believed to be a typographical error:
  182.  
  183. 12. Reply code "332 LOGIN PLEASE" is not listed anywhere in the
  184. command-reply correspondence table. It Would seem that this would
  185. be a more-information-needed (success) reply for all those
  186. commands which require the user to be logged in. It should also
  187. be stressed that the "332" code is to be used for this purpose, as
  188. many servers currently use other codes, such as "451" and "504",
  189. to mean "LOGIN PLEASE".
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.                                    -4-