[
  {
    "section_number": "1.",
    "section_name": "INTRODUCTION",
    "tag": "Section 1. INTRODUCTION",
    "content": "\n   The objectives of FTP are 1) to promote sharing of files (computer\n   programs and/or data), 2) to encourage indirect or implicit (via\n   programs) use of remote computers, 3) to shield a user from\n   variations in file storage systems among hosts, and 4) to transfer\n   data reliably and efficiently.  FTP, though usable directly by a user\n   at a terminal, is designed mainly for use by programs.\n\n   The attempt in this specification is to satisfy the diverse needs of\n   users of maxi-hosts, mini-hosts, personal workstations, and TACs,\n   with a simple, and easily implemented protocol design.\n\n   This paper assumes knowledge of the Transmission Control Protocol\n   (TCP) [2] and the Telnet Protocol [3].  These documents are contained\n   in the ARPA-Internet protocol handbook [1]."
  },
  {
    "section_number": "2.",
    "section_name": "OVERVIEW",
    "tag": "Section 2. OVERVIEW",
    "content": "\n   In this section, the history, the terminology, and the FTP model are\n   discussed.  The terms defined in this section are only those that\n   have special significance in FTP.  Some of the terminology is very\n   specific to the FTP model; some readers may wish to turn to the\n   section on the FTP model while reviewing the terminology.\n\n\n\n\n\n\n\n\n   2.1.  HISTORY\n\n      FTP has had a long evolution over the years.  Appendix III is a\n      chronological compilation of Request for Comments documents\n      relating to FTP.  These include the first proposed file transfer\n      mechanisms in 1971 that were developed for implementation on hosts\n      at M.I.T. (RFC 114), plus comments and discussion in RFC 141.\n\n      RFC 172 provided a user-level oriented protocol for file transfer\n      between host computers (including terminal IMPs).  A revision of\n      this as RFC 265, restated FTP for additional review, while RFC 281\n      suggested further changes.  The use of a \"Set Data Type\"\n      transaction was proposed in RFC 294 in January 1982.\n\n      RFC 354 obsoleted RFCs 264 and 265.  The File Transfer Protocol\n      was now defined as a protocol for file transfer between HOSTs on\n      the ARPANET, with the primary function of FTP defined as\n      transfering files efficiently and reliably among hosts and\n      allowing the convenient use of remote file storage capabilities.\n      RFC 385 further commented on errors, emphasis points, and\n      additions to the protocol, while RFC 414 provided a status report\n      on the working server and user FTPs.  RFC 430, issued in 1973,\n      (among other RFCs too numerous to mention) presented further\n      comments on FTP.  Finally, an \"official\" FTP document was\n      published as RFC 454.\n\n      By July 1973, considerable changes from the last versions of FTP\n      were made, but the general structure remained the same.  RFC 542\n      was published as a new \"official\" specification to reflect these\n      changes.  However, many implementations based on the older\n      specification were not updated.\n\n      In 1974, RFCs 607 and 614 continued comments on FTP.  RFC 624\n      proposed further design changes and minor modifications.  In 1975,\n      RFC 686 entitled, \"Leaving Well Enough Alone\", discussed the\n      differences between all of the early and later versions of FTP.\n      RFC 691 presented a minor revision of RFC 686, regarding the\n      subject of print files.\n\n      Motivated by the transition from the NCP to the TCP as the\n      underlying protocol, a phoenix was born out of all of the above\n      efforts in RFC 765 as the specification of FTP for use on TCP.\n\n      This current edition of the FTP specification is intended to\n      correct some minor documentation errors, to improve the\n      explanation of some protocol features, and to add some new\n      optional commands.\n\n\n\n      In particular, the following new optional commands are included in\n      this edition of the specification:\n\n         CDUP - Change to Parent Directory\n\n         SMNT - Structure Mount\n\n         STOU - Store Unique\n\n         RMD - Remove Directory\n\n         MKD - Make Directory\n\n         PWD - Print Directory\n\n         SYST - System\n\n      This specification is compatible with the previous edition.  A\n      program implemented in conformance to the previous specification\n      should automatically be in conformance to this specification.\n\n   2.2.  TERMINOLOGY\n\n      ASCII\n\n         The ASCII character set is as defined in the ARPA-Internet\n         Protocol Handbook.  In FTP, ASCII characters are defined to be\n         the lower half of an eight-bit code set (i.e., the most\n         significant bit is zero).\n\n      access controls\n\n         Access controls define users' access privileges to the use of a\n         system, and to the files in that system.  Access controls are\n         necessary to prevent unauthorized or accidental use of files.\n         It is the prerogative of a server-FTP process to invoke access\n         controls.\n\n      byte size\n\n         There are two byte sizes of interest in FTP:  the logical byte\n         size of the file, and the transfer byte size used for the\n         transmission of the data.  The transfer byte size is always 8\n         bits.  The transfer byte size is not necessarily the byte size\n         in which data is to be stored in a system, nor the logical byte\n         size for interpretation of the structure of the data.\n\n\n\n\n      control connection\n\n         The communication path between the USER-PI and SERVER-PI for\n         the exchange of commands and replies.  This connection follows\n         the Telnet Protocol.\n\n      data connection\n\n         A full duplex connection over which data is transferred, in a\n         specified mode and type. The data transferred may be a part of\n         a file, an entire file or a number of files.  The path may be\n         between a server-DTP and a user-DTP, or between two\n         server-DTPs.\n\n      data port\n\n         The passive data transfer process \"listens\" on the data port\n         for a connection from the active transfer process in order to\n         open the data connection.\n\n      DTP\n\n         The data transfer process establishes and manages the data\n         connection.  The DTP can be passive or active.\n\n      End-of-Line\n\n         The end-of-line sequence defines the separation of printing\n         lines.  The sequence is Carriage Return, followed by Line Feed.\n\n      EOF\n\n         The end-of-file condition that defines the end of a file being\n         transferred.\n\n      EOR\n\n         The end-of-record condition that defines the end of a record\n         being transferred.\n\n      error recovery\n\n         A procedure that allows a user to recover from certain errors\n         such as failure of either host system or transfer process.  In\n         FTP, error recovery may involve restarting a file transfer at a\n         given checkpoint.\n\n\n\n\n      FTP commands\n\n         A set of commands that comprise the control information flowing\n         from the user-FTP to the server-FTP process.\n\n      file\n\n         An ordered set of computer data (including programs), of\n         arbitrary length, uniquely identified by a pathname.\n\n      mode\n\n         The mode in which data is to be transferred via the data\n         connection.  The mode defines the data format during transfer\n         including EOR and EOF.  The transfer modes defined in FTP are\n         described in the Section on Transmission Modes.\n\n      NVT\n\n         The Network Virtual Terminal as defined in the Telnet Protocol.\n\n      NVFS\n\n         The Network Virtual File System.  A concept which defines a\n         standard network file system with standard commands and\n         pathname conventions.\n\n      page\n\n         A file may be structured as a set of independent parts called\n         pages.  FTP supports the transmission of discontinuous files as\n         independent indexed pages.\n\n      pathname\n\n         Pathname is defined to be the character string which must be\n         input to a file system by a user in order to identify a file.\n         Pathname normally contains device and/or directory names, and\n         file name specification.  FTP does not yet specify a standard\n         pathname convention.  Each user must follow the file naming\n         conventions of the file systems involved in the transfer.\n\n      PI\n\n         The protocol interpreter.  The user and server sides of the\n         protocol have distinct roles implemented in a user-PI and a\n         server-PI.\n\n\n\n      record\n\n         A sequential file may be structured as a number of contiguous\n         parts called records.  Record structures are supported by FTP\n         but a file need not have record structure.\n\n      reply\n\n         A reply is an acknowledgment (positive or negative) sent from\n         server to user via the control connection in response to FTP\n         commands.  The general form of a reply is a completion code\n         (including error codes) followed by a text string.  The codes\n         are for use by programs and the text is usually intended for\n         human users.\n\n      server-DTP\n\n         The data transfer process, in its normal \"active\" state,\n         establishes the data connection with the \"listening\" data port.\n         It sets up parameters for transfer and storage, and transfers\n         data on command from its PI.  The DTP can be placed in a\n         \"passive\" state to listen for, rather than initiate a\n         connection on the data port.\n\n      server-FTP process\n\n         A process or set of processes which perform the function of\n         file transfer in cooperation with a user-FTP process and,\n         possibly, another server.  The functions consist of a protocol\n         interpreter (PI) and a data transfer process (DTP).\n\n      server-PI\n\n         The server protocol interpreter \"listens\" on Port L for a\n         connection from a user-PI and establishes a control\n         communication connection.  It receives standard FTP commands\n         from the user-PI, sends replies, and governs the server-DTP.\n\n      type\n\n         The data representation type used for data transfer and\n         storage.  Type implies certain transformations between the time\n         of data storage and data transfer.  The representation types\n         defined in FTP are described in the Section on Establishing\n         Data Connections.\n\n\n\n\n\n      user\n\n         A person or a process on behalf of a person wishing to obtain\n         file transfer service.  The human user may interact directly\n         with a server-FTP process, but use of a user-FTP process is\n         preferred since the protocol design is weighted towards\n         automata.\n\n      user-DTP\n\n         The data transfer process \"listens\" on the data port for a\n         connection from a server-FTP process.  If two servers are\n         transferring data between them, the user-DTP is inactive.\n\n      user-FTP process\n\n         A set of functions including a protocol interpreter, a data\n         transfer process and a user interface which together perform\n         the function of file transfer in cooperation with one or more\n         server-FTP processes.  The user interface allows a local\n         language to be used in the command-reply dialogue with the\n         user.\n\n      user-PI\n\n         The user protocol interpreter initiates the control connection\n         from its port U to the server-FTP process, initiates FTP\n         commands, and governs the user-DTP if that process is part of\n         the file transfer.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n   2.3.  THE FTP MODEL\n\n      With the above definitions in mind, the following model (shown in\n      Figure 1) may be diagrammed for an FTP service.\n\n                                            -------------\n                                            |/---------\\|\n                                            ||   User  ||    --------\n                                            ||Interface|<--->| User |\n                                            |\\----^----/|    --------\n                  ----------                |     |     |\n                  |/------\\|  FTP Commands  |/----V----\\|\n                  ||Server|<---------------->|   User  ||\n                  ||  PI  ||   FTP Replies  ||    PI   ||\n                  |\\--^---/|                |\\----^----/|\n                  |   |    |                |     |     |\n      --------    |/--V---\\|      Data      |/----V----\\|    --------\n      | File |<--->|Server|<---------------->|  User   |<--->| File |\n      |System|    || DTP  ||   Connection   ||   DTP   ||    |System|\n      --------    |\\------/|                |\\---------/|    --------\n                  ----------                -------------\n\n                  Server-FTP                   USER-FTP\n\n      NOTES: 1. The data connection may be used in either direction.\n             2. The data connection need not exist all of the time.\n\n                      Figure 1  Model for FTP Use\n\n      In the model described in Figure 1, the user-protocol interpreter\n      initiates the control connection.  The control connection follows\n      the Telnet protocol.  At the initiation of the user, standard FTP\n      commands are generated by the user-PI and transmitted to the\n      server process via the control connection.  (The user may\n      establish a direct control connection to the server-FTP, from a\n      TAC terminal for example, and generate standard FTP commands\n      independently, bypassing the user-FTP process.) Standard replies\n      are sent from the server-PI to the user-PI over the control\n      connection in response to the commands.\n\n      The FTP commands specify the parameters for the data connection\n      (data port, transfer mode, representation type, and structure) and\n      the nature of file system operation (store, retrieve, append,\n      delete, etc.).  The user-DTP or its designate should \"listen\" on\n      the specified data port, and the server initiate the data\n      connection and data transfer in accordance with the specified\n      parameters.  It should be noted that the data port need not be in\n\n\n\n      the same host that initiates the FTP commands via the control\n      connection, but the user or the user-FTP process must ensure a\n      \"listen\" on the specified data port.  It ought to also be noted\n      that the data connection may be used for simultaneous sending and\n      receiving.\n\n      In another situation a user might wish to transfer files between\n      two hosts, neither of which is a local host. The user sets up\n      control connections to the two servers and then arranges for a\n      data connection between them.  In this manner, control information\n      is passed to the user-PI but data is transferred between the\n      server data transfer processes.  Following is a model of this\n      server-server interaction.\n\n      \n                    Control     ------------   Control\n                    ---------->| User-FTP |<-----------\n                    |          | User-PI  |           |\n                    |          |   \"C\"    |           |\n                    V          ------------           V\n            --------------                        --------------\n            | Server-FTP |   Data Connection      | Server-FTP |\n            |    \"A\"     |<---------------------->|    \"B\"     |\n            -------------- Port (A)      Port (B) --------------\n      \n\n                                 Figure 2\n\n      The protocol requires that the control connections be open while\n      data transfer is in progress.  It is the responsibility of the\n      user to request the closing of the control connections when\n      finished using the FTP service, while it is the server who takes\n      the action.  The server may abort data transfer if the control\n      connections are closed without command.\n\n      The Relationship between FTP and Telnet:\n\n         The FTP uses the Telnet protocol on the control connection.\n         This can be achieved in two ways: first, the user-PI or the\n         server-PI may implement the rules of the Telnet Protocol\n         directly in their own procedures; or, second, the user-PI or\n         the server-PI may make use of the existing Telnet module in the\n         system.\n\n         Ease of implementaion, sharing code, and modular programming\n         argue for the second approach.  Efficiency and independence\n\n\n\n\n         argue for the first approach.  In practice, FTP relies on very\n         little of the Telnet Protocol, so the first approach does not\n         necessarily involve a large amount of code."
  },
  {
    "section_number": "3.",
    "section_name": "DATA TRANSFER FUNCTIONS",
    "tag": "Section 3. DATA TRANSFER FUNCTIONS",
    "content": "\n   Files are transferred only via the data connection.  The control\n   connection is used for the transfer of commands, which describe the\n   functions to be performed, and the replies to these commands (see the\n   Section on FTP Replies).  Several commands are concerned with the\n   transfer of data between hosts.  These data transfer commands include\n   the MODE command which specify how the bits of the data are to be\n   transmitted, and the STRUcture and TYPE commands, which are used to\n   define the way in which the data are to be represented.  The\n   transmission and representation are basically independent but the\n   \"Stream\" transmission mode is dependent on the file structure\n   attribute and if \"Compressed\" transmission mode is used, the nature\n   of the filler byte depends on the representation type.\n\n   3.1.  DATA REPRESENTATION AND STORAGE\n\n      Data is transferred from a storage device in the sending host to a\n      storage device in the receiving host.  Often it is necessary to\n      perform certain transformations on the data because data storage\n      representations in the two systems are different.  For example,\n      NVT-ASCII has different data storage representations in different\n      systems.  DEC TOPS-20s's generally store NVT-ASCII as five 7-bit\n      ASCII characters, left-justified in a 36-bit word. IBM Mainframe's\n      store NVT-ASCII as 8-bit EBCDIC codes.  Multics stores NVT-ASCII\n      as four 9-bit characters in a 36-bit word.  It is desirable to\n      convert characters into the standard NVT-ASCII representation when\n      transmitting text between dissimilar systems.  The sending and\n      receiving sites would have to perform the necessary\n      transformations between the standard representation and their\n      internal representations.\n\n      A different problem in representation arises when transmitting\n      binary data (not character codes) between host systems with\n      different word lengths.  It is not always clear how the sender\n      should send data, and the receiver store it.  For example, when\n      transmitting 32-bit bytes from a 32-bit word-length system to a\n      36-bit word-length system, it may be desirable (for reasons of\n      efficiency and usefulness) to store the 32-bit bytes\n      right-justified in a 36-bit word in the latter system.  In any\n      case, the user should have the option of specifying data\n      representation and transformation functions.  It should be noted\n\n\n\n\n      that FTP provides for very limited data type representations.\n      Transformations desired beyond this limited capability should be\n      performed by the user directly.\n\n      3.1.1.  DATA TYPES\n\n         Data representations are handled in FTP by a user specifying a\n         representation type.  This type may implicitly (as in ASCII or\n         EBCDIC) or explicitly (as in Local byte) define a byte size for\n         interpretation which is referred to as the \"logical byte size.\"\n         Note that this has nothing to do with the byte size used for\n         transmission over the data connection, called the \"transfer\n         byte size\", and the two should not be confused.  For example,\n         NVT-ASCII has a logical byte size of 8 bits.  If the type is\n         Local byte, then the TYPE command has an obligatory second\n         parameter specifying the logical byte size.  The transfer byte\n         size is always 8 bits.\n\n         3.1.1.1.  ASCII TYPE\n\n            This is the default type and must be accepted by all FTP\n            implementations.  It is intended primarily for the transfer\n            of text files, except when both hosts would find the EBCDIC\n            type more convenient.\n\n            The sender converts the data from an internal character\n            representation to the standard 8-bit NVT-ASCII\n            representation (see the Telnet specification).  The receiver\n            will convert the data from the standard form to his own\n            internal form.\n\n            In accordance with the NVT standard, the <CRLF> sequence\n            should be used where necessary to denote the end of a line\n            of text.  (See the discussion of file structure at the end\n            of the Section on Data Representation and Storage.)\n\n            Using the standard NVT-ASCII representation means that data\n            must be interpreted as 8-bit bytes.\n\n            The Format parameter for ASCII and EBCDIC types is discussed\n            below.\n\n\n\n\n\n\n\n\n\n         3.1.1.2.  EBCDIC TYPE\n\n            This type is intended for efficient transfer between hosts\n            which use EBCDIC for their internal character\n            representation.\n\n            For transmission, the data are represented as 8-bit EBCDIC\n            characters.  The character code is the only difference\n            between the functional specifications of EBCDIC and ASCII\n            types.\n\n            End-of-line (as opposed to end-of-record--see the discussion\n            of structure) will probably be rarely used with EBCDIC type\n            for purposes of denoting structure, but where it is\n            necessary the <NL> character should be used.\n\n         3.1.1.3.  IMAGE TYPE\n\n            The data are sent as contiguous bits which, for transfer,\n            are packed into the 8-bit transfer bytes.  The receiving\n            site must store the data as contiguous bits.  The structure\n            of the storage system might necessitate the padding of the\n            file (or of each record, for a record-structured file) to\n            some convenient boundary (byte, word or block).  This\n            padding, which must be all zeros, may occur only at the end\n            of the file (or at the end of each record) and there must be\n            a way of identifying the padding bits so that they may be\n            stripped off if the file is retrieved.  The padding\n            transformation should be well publicized to enable a user to\n            process a file at the storage site.\n\n            Image type is intended for the efficient storage and\n            retrieval of files and for the transfer of binary data.  It\n            is recommended that this type be accepted by all FTP\n            implementations.\n\n         3.1.1.4.  LOCAL TYPE\n\n            The data is transferred in logical bytes of the size\n            specified by the obligatory second parameter, Byte size.\n            The value of Byte size must be a decimal integer; there is\n            no default value.  The logical byte size is not necessarily\n            the same as the transfer byte size.  If there is a\n            difference in byte sizes, then the logical bytes should be\n            packed contiguously, disregarding transfer byte boundaries\n            and with any necessary padding at the end.\n\n\n\n\n            When the data reaches the receiving host, it will be\n            transformed in a manner dependent on the logical byte size\n            and the particular host.  This transformation must be\n            invertible (i.e., an identical file can be retrieved if the\n            same parameters are used) and should be well publicized by\n            the FTP implementors.\n\n            For example, a user sending 36-bit floating-point numbers to\n            a host with a 32-bit word could send that data as Local byte\n            with a logical byte size of 36.  The receiving host would\n            then be expected to store the logical bytes so that they\n            could be easily manipulated; in this example putting the\n            36-bit logical bytes into 64-bit double words should\n            suffice.\n\n            In another example, a pair of hosts with a 36-bit word size\n            may send data to one another in words by using TYPE L 36.\n            The data would be sent in the 8-bit transmission bytes\n            packed so that 9 transmission bytes carried two host words.\n\n         3.1.1.5.  FORMAT CONTROL\n\n            The types ASCII and EBCDIC also take a second (optional)\n            parameter; this is to indicate what kind of vertical format\n            control, if any, is associated with a file.  The following\n            data representation types are defined in FTP:\n\n            A character file may be transferred to a host for one of\n            three purposes: for printing, for storage and later\n            retrieval, or for processing.  If a file is sent for\n            printing, the receiving host must know how the vertical\n            format control is represented.  In the second case, it must\n            be possible to store a file at a host and then retrieve it\n            later in exactly the same form.  Finally, it should be\n            possible to move a file from one host to another and process\n            the file at the second host without undue trouble.  A single\n            ASCII or EBCDIC format does not satisfy all these\n            conditions.  Therefore, these types have a second parameter\n            specifying one of the following three formats:\n\n            3.1.1.5.1.  NON PRINT\n\n               This is the default format to be used if the second\n               (format) parameter is omitted.  Non-print format must be\n               accepted by all FTP implementations.\n\n\n\n\n\n               The file need contain no vertical format information.  If\n               it is passed to a printer process, this process may\n               assume standard values for spacing and margins.\n\n               Normally, this format will be used with files destined\n               for processing or just storage.\n\n            3.1.1.5.2.  TELNET FORMAT CONTROLS\n\n               The file contains ASCII/EBCDIC vertical format controls\n               (i.e., <CR>, <LF>, <NL>, <VT>, <FF>) which the printer\n               process will interpret appropriately.  <CRLF>, in exactly\n               this sequence, also denotes end-of-line.\n\n            3.1.1.5.2.  CARRIAGE CONTROL (ASA)\n\n               The file contains ASA (FORTRAN) vertical format control\n               characters.  (See RFC 740 Appendix C; and Communications\n               of the ACM, Vol. 7, No. 10, p. 606, October 1964.)  In a\n               line or a record formatted according to the ASA Standard,\n               the first character is not to be printed.  Instead, it\n               should be used to determine the vertical movement of the\n               paper which should take place before the rest of the\n               record is printed.\n\n               The ASA Standard specifies the following control\n               characters:\n\n                  Character     Vertical Spacing\n\n                  blank         Move paper up one line\n                  0             Move paper up two lines\n                  1             Move paper to top of next page\n                  +             No movement, i.e., overprint\n\n               Clearly there must be some way for a printer process to\n               distinguish the end of the structural entity.  If a file\n               has record structure (see below) this is no problem;\n               records will be explicitly marked during transfer and\n               storage.  If the file has no record structure, the <CRLF>\n               end-of-line sequence is used to separate printing lines,\n               but these format effectors are overridden by the ASA\n               controls.\n\n\n\n\n\n\n\n      3.1.2.  DATA STRUCTURES\n\n         In addition to different representation types, FTP allows the\n         structure of a file to be specified.  Three file structures are\n         defined in FTP:\n\n            file-structure,     where there is no internal structure and\n                                the file is considered to be a\n                                continuous sequence of data bytes,\n\n            record-structure,   where the file is made up of sequential\n                                records,\n\n            and page-structure, where the file is made up of independent\n                                indexed pages.\n\n         File-structure is the default to be assumed if the STRUcture\n         command has not been used but both file and record structures\n         must be accepted for \"text\" files (i.e., files with TYPE ASCII\n         or EBCDIC) by all FTP implementations.  The structure of a file\n         will affect both the transfer mode of a file (see the Section\n         on Transmission Modes) and the interpretation and storage of\n         the file.\n\n         The \"natural\" structure of a file will depend on which host\n         stores the file.  A source-code file will usually be stored on\n         an IBM Mainframe in fixed length records but on a DEC TOPS-20\n         as a stream of characters partitioned into lines, for example\n         by <CRLF>.  If the transfer of files between such disparate\n         sites is to be useful, there must be some way for one site to\n         recognize the other's assumptions about the file.\n\n         With some sites being naturally file-oriented and others\n         naturally record-oriented there may be problems if a file with\n         one structure is sent to a host oriented to the other.  If a\n         text file is sent with record-structure to a host which is file\n         oriented, then that host should apply an internal\n         transformation to the file based on the record structure.\n         Obviously, this transformation should be useful, but it must\n         also be invertible so that an identical file may be retrieved\n         using record structure.\n\n         In the case of a file being sent with file-structure to a\n         record-oriented host, there exists the question of what\n         criteria the host should use to divide the file into records\n         which can be processed locally.  If this division is necessary,\n         the FTP implementation should use the end-of-line sequence,\n\n\n\n         <CRLF> for ASCII, or <NL> for EBCDIC text files, as the\n         delimiter.  If an FTP implementation adopts this technique, it\n         must be prepared to reverse the transformation if the file is\n         retrieved with file-structure.\n\n         3.1.2.1.  FILE STRUCTURE\n\n            File structure is the default to be assumed if the STRUcture\n            command has not been used.\n\n            In file-structure there is no internal structure and the\n            file is considered to be a continuous sequence of data\n            bytes.\n\n         3.1.2.2.  RECORD STRUCTURE\n\n            Record structures must be accepted for \"text\" files (i.e.,\n            files with TYPE ASCII or EBCDIC) by all FTP implementations.\n\n            In record-structure the file is made up of sequential\n            records.\n\n         3.1.2.3.  PAGE STRUCTURE\n\n            To transmit files that are discontinuous, FTP defines a page\n            structure.  Files of this type are sometimes known as\n            \"random access files\" or even as \"holey files\".  In these\n            files there is sometimes other information associated with\n            the file as a whole (e.g., a file descriptor), or with a\n            section of the file (e.g., page access controls), or both.\n            In FTP, the sections of the file are called pages.\n\n            To provide for various page sizes and associated\n            information, each page is sent with a page header.  The page\n            header has the following defined fields:\n\n               Header Length\n\n                  The number of logical bytes in the page header\n                  including this byte.  The minimum header length is 4.\n\n               Page Index\n\n                  The logical page number of this section of the file.\n                  This is not the transmission sequence number of this\n                  page, but the index used to identify this page of the\n                  file.\n\n\n\n               Data Length\n\n                  The number of logical bytes in the page data.  The\n                  minimum data length is 0.\n\n               Page Type\n\n                  The type of page this is.  The following page types\n                  are defined:\n\n                     0 = Last Page\n\n                        This is used to indicate the end of a paged\n                        structured transmission.  The header length must\n                        be 4, and the data length must be 0.\n\n                     1 = Simple Page\n\n                        This is the normal type for simple paged files\n                        with no page level associated control\n                        information.  The header length must be 4.\n\n                     2 = Descriptor Page\n\n                        This type is used to transmit the descriptive\n                        information for the file as a whole.\n\n                     3 = Access Controlled Page\n\n                        This type includes an additional header field\n                        for paged files with page level access control\n                        information.  The header length must be 5.\n\n               Optional Fields\n\n                  Further header fields may be used to supply per page\n                  control information, for example, per page access\n                  control.\n\n            All fields are one logical byte in length.  The logical byte\n            size is specified by the TYPE command.  See Appendix I for\n            further details and a specific case at the page structure.\n\n      A note of caution about parameters:  a file must be stored and\n      retrieved with the same parameters if the retrieved version is to\n\n\n\n\n\n      be identical to the version originally transmitted.  Conversely,\n      FTP implementations must return a file identical to the original\n      if the parameters used to store and retrieve a file are the same.\n\n   3.2.  ESTABLISHING DATA CONNECTIONS\n\n      The mechanics of transferring data consists of setting up the data\n      connection to the appropriate ports and choosing the parameters\n      for transfer.  Both the user and the server-DTPs have a default\n      data port.  The user-process default data port is the same as the\n      control connection port (i.e., U).  The server-process default\n      data port is the port adjacent to the control connection port\n      (i.e., L-1).\n\n      The transfer byte size is 8-bit bytes.  This byte size is relevant\n      only for the actual transfer of the data; it has no bearing on\n      representation of the data within a host's file system.\n\n      The passive data transfer process (this may be a user-DTP or a\n      second server-DTP) shall \"listen\" on the data port prior to\n      sending a transfer request command.  The FTP request command\n      determines the direction of the data transfer.  The server, upon\n      receiving the transfer request, will initiate the data connection\n      to the port.  When the connection is established, the data\n      transfer begins between DTP's, and the server-PI sends a\n      confirming reply to the user-PI.\n\n      Every FTP implementation must support the use of the default data\n      ports, and only the USER-PI can initiate a change to non-default\n      ports.\n\n      It is possible for the user to specify an alternate data port by\n      use of the PORT command.  The user may want a file dumped on a TAC\n      line printer or retrieved from a third party host.  In the latter\n      case, the user-PI sets up control connections with both\n      server-PI's.  One server is then told (by an FTP command) to\n      \"listen\" for a connection which the other will initiate.  The\n      user-PI sends one server-PI a PORT command indicating the data\n      port of the other.  Finally, both are sent the appropriate\n      transfer commands.  The exact sequence of commands and replies\n      sent between the user-controller and the servers is defined in the\n      Section on FTP Replies.\n\n      In general, it is the server's responsibility to maintain the data\n      connection--to initiate it and to close it.  The exception to this\n\n\n\n\n\n      is when the user-DTP is sending the data in a transfer mode that\n      requires the connection to be closed to indicate EOF.  The server\n      MUST close the data connection under the following conditions:\n\n         1. The server has completed sending data in a transfer mode\n            that requires a close to indicate EOF.\n\n         2. The server receives an ABORT command from the user.\n\n         3. The port specification is changed by a command from the\n            user.\n\n         4. The control connection is closed legally or otherwise.\n\n         5. An irrecoverable error condition occurs.\n\n      Otherwise the close is a server option, the exercise of which the\n      server must indicate to the user-process by either a 250 or 226\n      reply only.\n\n   3.3.  DATA CONNECTION MANAGEMENT\n\n      Default Data Connection Ports:  All FTP implementations must\n      support use of the default data connection ports, and only the\n      User-PI may initiate the use of non-default ports.\n\n      Negotiating Non-Default Data Ports:   The User-PI may specify a\n      non-default user side data port with the PORT command.  The\n      User-PI may request the server side to identify a non-default\n      server side data port with the PASV command.  Since a connection\n      is defined by the pair of addresses, either of these actions is\n      enough to get a different data connection, still it is permitted\n      to do both commands to use new ports on both ends of the data\n      connection.\n\n      Reuse of the Data Connection:  When using the stream mode of data\n      transfer the end of the file must be indicated by closing the\n      connection.  This causes a problem if multiple files are to be\n      transfered in the session, due to need for TCP to hold the\n      connection record for a time out period to guarantee the reliable\n      communication.  Thus the connection can not be reopened at once.\n\n         There are two solutions to this problem.  The first is to\n         negotiate a non-default port.  The second is to use another\n         transfer mode.\n\n         A comment on transfer modes.  The stream transfer mode is\n\n\n\n         inherently unreliable, since one can not determine if the\n         connection closed prematurely or not.  The other transfer modes\n         (Block, Compressed) do not close the connection to indicate the\n         end of file.  They have enough FTP encoding that the data\n         connection can be parsed to determine the end of the file.\n         Thus using these modes one can leave the data connection open\n         for multiple file transfers.\n\n   3.4.  TRANSMISSION MODES\n\n      The next consideration in transferring data is choosing the\n      appropriate transmission mode.  There are three modes: one which\n      formats the data and allows for restart procedures; one which also\n      compresses the data for efficient transfer; and one which passes\n      the data with little or no processing.  In this last case the mode\n      interacts with the structure attribute to determine the type of\n      processing.  In the compressed mode, the representation type\n      determines the filler byte.\n\n      All data transfers must be completed with an end-of-file (EOF)\n      which may be explicitly stated or implied by the closing of the\n      data connection.  For files with record structure, all the\n      end-of-record markers (EOR) are explicit, including the final one.\n      For files transmitted in page structure a \"last-page\" page type is\n      used.\n\n      NOTE:  In the rest of this section, byte means \"transfer byte\"\n      except where explicitly stated otherwise.\n\n      For the purpose of standardized transfer, the sending host will\n      translate its internal end of line or end of record denotation\n      into the representation prescribed by the transfer mode and file\n      structure, and the receiving host will perform the inverse\n      translation to its internal denotation.  An IBM Mainframe record\n      count field may not be recognized at another host, so the\n      end-of-record information may be transferred as a two byte control\n      code in Stream mode or as a flagged bit in a Block or Compressed\n      mode descriptor.  End-of-line in an ASCII or EBCDIC file with no\n      record structure should be indicated by <CRLF> or <NL>,\n      respectively.  Since these transformations imply extra work for\n      some systems, identical systems transferring non-record structured\n      text files might wish to use a binary representation and stream\n      mode for the transfer.\n\n\n\n\n\n\n\n      The following transmission modes are defined in FTP:\n\n      3.4.1.  STREAM MODE\n\n         The data is transmitted as a stream of bytes.  There is no\n         restriction on the representation type used; record structures\n         are allowed.\n\n         In a record structured file EOR and EOF will each be indicated\n         by a two-byte control code.  The first byte of the control code\n         will be all ones, the escape character.  The second byte will\n         have the low order bit on and zeros elsewhere for EOR and the\n         second low order bit on for EOF; that is, the byte will have\n         value 1 for EOR and value 2 for EOF.  EOR and EOF may be\n         indicated together on the last byte transmitted by turning both\n         low order bits on (i.e., the value 3).  If a byte of all ones\n         was intended to be sent as data, it should be repeated in the\n         second byte of the control code.\n\n         If the structure is a file structure, the EOF is indicated by\n         the sending host closing the data connection and all bytes are\n         data bytes.\n\n      3.4.2.  BLOCK MODE\n\n         The file is transmitted as a series of data blocks preceded by\n         one or more header bytes.  The header bytes contain a count\n         field, and descriptor code.  The count field indicates the\n         total length of the data block in bytes, thus marking the\n         beginning of the next data block (there are no filler bits).\n         The descriptor code defines:  last block in the file (EOF) last\n         block in the record (EOR), restart marker (see the Section on\n         Error Recovery and Restart) or suspect data (i.e., the data\n         being transferred is suspected of errors and is not reliable).\n         This last code is NOT intended for error control within FTP.\n         It is motivated by the desire of sites exchanging certain types\n         of data (e.g., seismic or weather data) to send and receive all\n         the data despite local errors (such as \"magnetic tape read\n         errors\"), but to indicate in the transmission that certain\n         portions are suspect).  Record structures are allowed in this\n         mode, and any representation type may be used.\n\n         The header consists of the three bytes.  Of the 24 bits of\n         header information, the 16 low order bits shall represent byte\n         count, and the 8 high order bits shall represent descriptor\n         codes as shown below.\n\n\n\n\n         Block Header\n\n            +----------------+----------------+----------------+\n            | Descriptor     |    Byte Count                   |\n            |         8 bits |                      16 bits    |\n            +----------------+----------------+----------------+\n            \n\n         The descriptor codes are indicated by bit flags in the\n         descriptor byte.  Four codes have been assigned, where each\n         code number is the decimal value of the corresponding bit in\n         the byte.\n\n            Code     Meaning\n            \n             128     End of data block is EOR\n              64     End of data block is EOF\n              32     Suspected errors in data block\n              16     Data block is a restart marker\n\n         With this encoding, more than one descriptor coded condition\n         may exist for a particular block.  As many bits as necessary\n         may be flagged.\n\n         The restart marker is embedded in the data stream as an\n         integral number of 8-bit bytes representing printable\n         characters in the language being used over the control\n         connection (e.g., default--NVT-ASCII).  <SP> (Space, in the\n         appropriate language) must not be used WITHIN a restart marker.\n\n         For example, to transmit a six-character marker, the following\n         would be sent:\n\n            +--------+--------+--------+\n            |Descrptr|  Byte count     |\n            |code= 16|             = 6 |\n            +--------+--------+--------+\n\n            +--------+--------+--------+\n            | Marker | Marker | Marker |\n            | 8 bits | 8 bits | 8 bits |\n            +--------+--------+--------+\n\n            +--------+--------+--------+\n            | Marker | Marker | Marker |\n            | 8 bits | 8 bits | 8 bits |\n            +--------+--------+--------+\n\n\n\n      3.4.3.  COMPRESSED MODE\n\n         There are three kinds of information to be sent:  regular data,\n         sent in a byte string; compressed data, consisting of\n         replications or filler; and control information, sent in a\n         two-byte escape sequence.  If n>0 bytes (up to 127) of regular\n         data are sent, these n bytes are preceded by a byte with the\n         left-most bit set to 0 and the right-most 7 bits containing the\n         number n.\n\n         Byte string:\n\n             1       7                8                     8\n            +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+     +-+-+-+-+-+-+-+-+\n            |0|       n     | |    d(1)       | ... |      d(n)     |\n            +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+     +-+-+-+-+-+-+-+-+\n                                          ^             ^\n                                          |---n bytes---|\n                                              of data\n\n            String of n data bytes d(1),..., d(n)\n            Count n must be positive.\n\n         To compress a string of n replications of the data byte d, the\n         following 2 bytes are sent:\n\n         Replicated Byte:\n\n              2       6               8\n            +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+\n            |1 0|     n     | |       d       |\n            +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+\n\n         A string of n filler bytes can be compressed into a single\n         byte, where the filler byte varies with the representation\n         type.  If the type is ASCII or EBCDIC the filler byte is <SP>\n         (Space, ASCII code 32, EBCDIC code 64).  If the type is Image\n         or Local byte the filler is a zero byte.\n\n         Filler String:\n\n              2       6\n            +-+-+-+-+-+-+-+-+\n            |1 1|     n     |\n            +-+-+-+-+-+-+-+-+\n\n         The escape sequence is a double byte, the first of which is the\n\n\n\n         escape byte (all zeros) and the second of which contains\n         descriptor codes as defined in Block mode.  The descriptor\n         codes have the same meaning as in Block mode and apply to the\n         succeeding string of bytes.\n\n         Compressed mode is useful for obtaining increased bandwidth on\n         very large network transmissions at a little extra CPU cost.\n         It can be most effectively used to reduce the size of printer\n         files such as those generated by RJE hosts.\n\n   3.5.  ERROR RECOVERY AND RESTART\n\n      There is no provision for detecting bits lost or scrambled in data\n      transfer; this level of error control is handled by the TCP.\n      However, a restart procedure is provided to protect users from\n      gross system failures (including failures of a host, an\n      FTP-process, or the underlying network).\n\n      The restart procedure is defined only for the block and compressed\n      modes of data transfer.  It requires the sender of data to insert\n      a special marker code in the data stream with some marker\n      information.  The marker information has meaning only to the\n      sender, but must consist of printable characters in the default or\n      negotiated language of the control connection (ASCII or EBCDIC).\n      The marker could represent a bit-count, a record-count, or any\n      other information by which a system may identify a data\n      checkpoint.  The receiver of data, if it implements the restart\n      procedure, would then mark the corresponding position of this\n      marker in the receiving system, and return this information to the\n      user.\n\n      In the event of a system failure, the user can restart the data\n      transfer by identifying the marker point with the FTP restart\n      procedure.  The following example illustrates the use of the\n      restart procedure.\n\n      The sender of the data inserts an appropriate marker block in the\n      data stream at a convenient point.  The receiving host marks the\n      corresponding data point in its file system and conveys the last\n      known sender and receiver marker information to the user, either\n      directly or over the control connection in a 110 reply (depending\n      on who is the sender).  In the event of a system failure, the user\n      or controller process restarts the server at the last server\n      marker by sending a restart command with server's marker code as\n      its argument.  The restart command is transmitted over the control\n\n\n\n\n\n      connection and is immediately followed by the command (such as\n      RETR, STOR or LIST) which was being executed when the system\n      failure occurred."
  },
  {
    "section_number": "4.",
    "section_name": "FILE TRANSFER FUNCTIONS",
    "tag": "Section 4. FILE TRANSFER FUNCTIONS",
    "content": "\n   The communication channel from the user-PI to the server-PI is\n   established as a TCP connection from the user to the standard server\n   port.  The user protocol interpreter is responsible for sending FTP\n   commands and interpreting the replies received; the server-PI\n   interprets commands, sends replies and directs its DTP to set up the\n   data connection and transfer the data.  If the second party to the\n   data transfer (the passive transfer process) is the user-DTP, then it\n   is governed through the internal protocol of the user-FTP host; if it\n   is a second server-DTP, then it is governed by its PI on command from\n   the user-PI.  The FTP replies are discussed in the next section.  In\n   the description of a few of the commands in this section, it is\n   helpful to be explicit about the possible replies.\n\n   4.1.  FTP COMMANDS\n\n      4.1.1.  ACCESS CONTROL COMMANDS\n\n         The following commands specify access control identifiers\n         (command codes are shown in parentheses).\n\n         USER NAME (USER)\n\n            The argument field is a Telnet string identifying the user.\n            The user identification is that which is required by the\n            server for access to its file system.  This command will\n            normally be the first command transmitted by the user after\n            the control connections are made (some servers may require\n            this).  Additional identification information in the form of\n            a password and/or an account command may also be required by\n            some servers.  Servers may allow a new USER command to be\n            entered at any point in order to change the access control\n            and/or accounting information.  This has the effect of\n            flushing any user, password, and account information already\n            supplied and beginning the login sequence again.  All\n            transfer parameters are unchanged and any file transfer in\n            progress is completed under the old access control\n            parameters.\n\n\n\n\n\n\n\n         PASSWORD (PASS)\n\n            The argument field is a Telnet string specifying the user's\n            password.  This command must be immediately preceded by the\n            user name command, and, for some sites, completes the user's\n            identification for access control.  Since password\n            information is quite sensitive, it is desirable in general\n            to \"mask\" it or suppress typeout.  It appears that the\n            server has no foolproof way to achieve this.  It is\n            therefore the responsibility of the user-FTP process to hide\n            the sensitive password information.\n\n         ACCOUNT (ACCT)\n\n            The argument field is a Telnet string identifying the user's\n            account.  The command is not necessarily related to the USER\n            command, as some sites may require an account for login and\n            others only for specific access, such as storing files.  In\n            the latter case the command may arrive at any time.\n\n            There are reply codes to differentiate these cases for the\n            automation: when account information is required for login,\n            the response to a successful PASSword command is reply code\n            332.  On the other hand, if account information is NOT\n            required for login, the reply to a successful PASSword\n            command is 230; and if the account information is needed for\n            a command issued later in the dialogue, the server should\n            return a 332 or 532 reply depending on whether it stores\n            (pending receipt of the ACCounT command) or discards the\n            command, respectively.\n\n         CHANGE WORKING DIRECTORY (CWD)\n\n            This command allows the user to work with a different\n            directory or dataset for file storage or retrieval without\n            altering his login or accounting information.  Transfer\n            parameters are similarly unchanged.  The argument is a\n            pathname specifying a directory or other system dependent\n            file group designator.\n\n         CHANGE TO PARENT DIRECTORY (CDUP)\n\n            This command is a special case of CWD, and is included to\n            simplify the implementation of programs for transferring\n            directory trees between operating systems having different\n\n\n\n\n\n            syntaxes for naming the parent directory.  The reply codes\n            shall be identical to the reply codes of CWD.  See\n            Appendix II for further details.\n\n         STRUCTURE MOUNT (SMNT)\n\n            This command allows the user to mount a different file\n            system data structure without altering his login or\n            accounting information.  Transfer parameters are similarly\n            unchanged.  The argument is a pathname specifying a\n            directory or other system dependent file group designator.\n\n         REINITIALIZE (REIN)\n\n            This command terminates a USER, flushing all I/O and account\n            information, except to allow any transfer in progress to be\n            completed.  All parameters are reset to the default settings\n            and the control connection is left open.  This is identical\n            to the state in which a user finds himself immediately after\n            the control connection is opened.  A USER command may be\n            expected to follow.\n\n         LOGOUT (QUIT)\n\n            This command terminates a USER and if file transfer is not\n            in progress, the server closes the control connection.  If\n            file transfer is in progress, the connection will remain\n            open for result response and the server will then close it.\n            If the user-process is transferring files for several USERs\n            but does not wish to close and then reopen connections for\n            each, then the REIN command should be used instead of QUIT.\n\n            An unexpected close on the control connection will cause the\n            server to take the effective action of an abort (ABOR) and a\n            logout (QUIT).\n\n      4.1.2.  TRANSFER PARAMETER COMMANDS\n\n         All data transfer parameters have default values, and the\n         commands specifying data transfer parameters are required only\n         if the default parameter values are to be changed.  The default\n         value is the last specified value, or if no value has been\n         specified, the standard default value is as stated here.  This\n         implies that the server must \"remember\" the applicable default\n         values.  The commands may be in any order except that they must\n         precede the FTP service request.  The following commands\n         specify data transfer parameters:\n\n\n\n         DATA PORT (PORT)\n\n            The argument is a HOST-PORT specification for the data port\n            to be used in data connection.  There are defaults for both\n            the user and server data ports, and under normal\n            circumstances this command and its reply are not needed.  If\n            this command is used, the argument is the concatenation of a\n            32-bit internet host address and a 16-bit TCP port address.\n            This address information is broken into 8-bit fields and the\n            value of each field is transmitted as a decimal number (in\n            character string representation).  The fields are separated\n            by commas.  A port command would be:\n\n               PORT h1,h2,h3,h4,p1,p2\n\n            where h1 is the high order 8 bits of the internet host\n            address.\n\n         PASSIVE (PASV)\n\n            This command requests the server-DTP to \"listen\" on a data\n            port (which is not its default data port) and to wait for a\n            connection rather than initiate one upon receipt of a\n            transfer command.  The response to this command includes the\n            host and port address this server is listening on.\n\n         REPRESENTATION TYPE (TYPE)\n\n            The argument specifies the representation type as described\n            in the Section on Data Representation and Storage.  Several\n            types take a second parameter.  The first parameter is\n            denoted by a single Telnet character, as is the second\n            Format parameter for ASCII and EBCDIC; the second parameter\n            for local byte is a decimal integer to indicate Bytesize.\n            The parameters are separated by a <SP> (Space, ASCII code\n            32).\n\n            The following codes are assigned for type:\n\n                         \\    /\n               A - ASCII |    | N - Non-print\n                         |-><-| T - Telnet format effectors\n               E - EBCDIC|    | C - Carriage Control (ASA)\n                         /    \\\n               I - Image\n               \n               L <byte size> - Local byte Byte size\n\n\n\n            The default representation type is ASCII Non-print.  If the\n            Format parameter is changed, and later just the first\n            argument is changed, Format then returns to the Non-print\n            default.\n\n         FILE STRUCTURE (STRU)\n\n            The argument is a single Telnet character code specifying\n            file structure described in the Section on Data\n            Representation and Storage.\n\n            The following codes are assigned for structure:\n\n               F - File (no record structure)\n               R - Record structure\n               P - Page structure\n\n            The default structure is File.\n\n         TRANSFER MODE (MODE)\n\n            The argument is a single Telnet character code specifying\n            the data transfer modes described in the Section on\n            Transmission Modes.\n\n            The following codes are assigned for transfer modes:\n\n               S - Stream\n               B - Block\n               C - Compressed\n\n            The default transfer mode is Stream.\n\n      4.1.3.  FTP SERVICE COMMANDS\n\n         The FTP service commands define the file transfer or the file\n         system function requested by the user.  The argument of an FTP\n         service command will normally be a pathname.  The syntax of\n         pathnames must conform to server site conventions (with\n         standard defaults applicable), and the language conventions of\n         the control connection.  The suggested default handling is to\n         use the last specified device, directory or file name, or the\n         standard default defined for local users.  The commands may be\n         in any order except that a \"rename from\" command must be\n         followed by a \"rename to\" command and the restart command must\n         be followed by the interrupted service command (e.g., STOR or\n         RETR).  The data, when transferred in response to FTP service\n\n\n\n         commands, shall always be sent over the data connection, except\n         for certain informative replies.  The following commands\n         specify FTP service requests:\n\n         RETRIEVE (RETR)\n\n            This command causes the server-DTP to transfer a copy of the\n            file, specified in the pathname, to the server- or user-DTP\n            at the other end of the data connection.  The status and\n            contents of the file at the server site shall be unaffected.\n\n         STORE (STOR)\n\n            This command causes the server-DTP to accept the data\n            transferred via the data connection and to store the data as\n            a file at the server site.  If the file specified in the\n            pathname exists at the server site, then its contents shall\n            be replaced by the data being transferred.  A new file is\n            created at the server site if the file specified in the\n            pathname does not already exist.\n\n         STORE UNIQUE (STOU)\n\n            This command behaves like STOR except that the resultant\n            file is to be created in the current directory under a name\n            unique to that directory.  The 250 Transfer Started response\n            must include the name generated.\n\n         APPEND (with create) (APPE)\n\n            This command causes the server-DTP to accept the data\n            transferred via the data connection and to store the data in\n            a file at the server site.  If the file specified in the\n            pathname exists at the server site, then the data shall be\n            appended to that file; otherwise the file specified in the\n            pathname shall be created at the server site.\n\n         ALLOCATE (ALLO)\n\n            This command may be required by some servers to reserve\n            sufficient storage to accommodate the new file to be\n            transferred.  The argument shall be a decimal integer\n            representing the number of bytes (using the logical byte\n            size) of storage to be reserved for the file.  For files\n            sent with record or page structure a maximum record or page\n            size (in logical bytes) might also be necessary; this is\n            indicated by a decimal integer in a second argument field of\n\n\n\n            the command.  This second argument is optional, but when\n            present should be separated from the first by the three\n            Telnet characters <SP> R <SP>.  This command shall be\n            followed by a STORe or APPEnd command.  The ALLO command\n            should be treated as a NOOP (no operation) by those servers\n            which do not require that the maximum size of the file be\n            declared beforehand, and those servers interested in only\n            the maximum record or page size should accept a dummy value\n            in the first argument and ignore it.\n\n         RESTART (REST)\n\n            The argument field represents the server marker at which\n            file transfer is to be restarted.  This command does not\n            cause file transfer but skips over the file to the specified\n            data checkpoint.  This command shall be immediately followed\n            by the appropriate FTP service command which shall cause\n            file transfer to resume.\n\n         RENAME FROM (RNFR)\n\n            This command specifies the old pathname of the file which is\n            to be renamed.  This command must be immediately followed by\n            a \"rename to\" command specifying the new file pathname.\n\n         RENAME TO (RNTO)\n\n            This command specifies the new pathname of the file\n            specified in the immediately preceding \"rename from\"\n            command.  Together the two commands cause a file to be\n            renamed.\n\n         ABORT (ABOR)\n\n            This command tells the server to abort the previous FTP\n            service command and any associated transfer of data.  The\n            abort command may require \"special action\", as discussed in\n            the Section on FTP Commands, to force recognition by the\n            server.  No action is to be taken if the previous command\n            has been completed (including data transfer).  The control\n            connection is not to be closed by the server, but the data\n            connection must be closed.\n\n            There are two cases for the server upon receipt of this\n            command: (1) the FTP service command was already completed,\n            or (2) the FTP service command is still in progress.\n\n\n\n\n               In the first case, the server closes the data connection\n               (if it is open) and responds with a 226 reply, indicating\n               that the abort command was successfully processed.\n\n               In the second case, the server aborts the FTP service in\n               progress and closes the data connection, returning a 426\n               reply to indicate that the service request terminated\n               abnormally.  The server then sends a 226 reply,\n               indicating that the abort command was successfully\n               processed.\n\n         DELETE (DELE)\n\n            This command causes the file specified in the pathname to be\n            deleted at the server site.  If an extra level of protection\n            is desired (such as the query, \"Do you really wish to\n            delete?\"), it should be provided by the user-FTP process.\n\n         REMOVE DIRECTORY (RMD)\n\n            This command causes the directory specified in the pathname\n            to be removed as a directory (if the pathname is absolute)\n            or as a subdirectory of the current working directory (if\n            the pathname is relative).  See Appendix II.\n\n         MAKE DIRECTORY (MKD)\n\n            This command causes the directory specified in the pathname\n            to be created as a directory (if the pathname is absolute)\n            or as a subdirectory of the current working directory (if\n            the pathname is relative).  See Appendix II.\n\n         PRINT WORKING DIRECTORY (PWD)\n\n            This command causes the name of the current working\n            directory to be returned in the reply.  See Appendix II.\n\n         LIST (LIST)\n\n            This command causes a list to be sent from the server to the\n            passive DTP.  If the pathname specifies a directory or other\n            group of files, the server should transfer a list of files\n            in the specified directory.  If the pathname specifies a\n            file then the server should send current information on the\n            file.  A null argument implies the user's current working or\n            default directory.  The data transfer is over the data\n            connection in type ASCII or type EBCDIC.  (The user must\n\n\n\n            ensure that the TYPE is appropriately ASCII or EBCDIC).\n            Since the information on a file may vary widely from system\n            to system, this information may be hard to use automatically\n            in a program, but may be quite useful to a human user.\n\n         NAME LIST (NLST)\n\n            This command causes a directory listing to be sent from\n            server to user site.  The pathname should specify a\n            directory or other system-specific file group descriptor; a\n            null argument implies the current directory.  The server\n            will return a stream of names of files and no other\n            information.  The data will be transferred in ASCII or\n            EBCDIC type over the data connection as valid pathname\n            strings separated by <CRLF> or <NL>.  (Again the user must\n            ensure that the TYPE is correct.)  This command is intended\n            to return information that can be used by a program to\n            further process the files automatically.  For example, in\n            the implementation of a \"multiple get\" function.\n\n         SITE PARAMETERS (SITE)\n\n            This command is used by the server to provide services\n            specific to his system that are essential to file transfer\n            but not sufficiently universal to be included as commands in\n            the protocol.  The nature of these services and the\n            specification of their syntax can be stated in a reply to\n            the HELP SITE command.\n\n         SYSTEM (SYST)\n\n            This command is used to find out the type of operating\n            system at the server.  The reply shall have as its first\n            word one of the system names listed in the current version\n            of the Assigned Numbers document [4].\n\n         STATUS (STAT)\n\n            This command shall cause a status response to be sent over\n            the control connection in the form of a reply.  The command\n            may be sent during a file transfer (along with the Telnet IP\n            and Synch signals--see the Section on FTP Commands) in which\n            case the server will respond with the status of the\n            operation in progress, or it may be sent between file\n            transfers.  In the latter case, the command may have an\n            argument field.  If the argument is a pathname, the command\n            is analogous to the \"list\" command except that data shall be\n\n\n\n            transferred over the control connection.  If a partial\n            pathname is given, the server may respond with a list of\n            file names or attributes associated with that specification.\n            If no argument is given, the server should return general\n            status information about the server FTP process.  This\n            should include current values of all transfer parameters and\n            the status of connections.\n\n         HELP (HELP)\n\n            This command shall cause the server to send helpful\n            information regarding its implementation status over the\n            control connection to the user.  The command may take an\n            argument (e.g., any command name) and return more specific\n            information as a response.  The reply is type 211 or 214.\n            It is suggested that HELP be allowed before entering a USER\n            command. The server may use this reply to specify\n            site-dependent parameters, e.g., in response to HELP SITE.\n\n         NOOP (NOOP)\n\n            This command does not affect any parameters or previously\n            entered commands. It specifies no action other than that the\n            server send an OK reply.\n\n   The File Transfer Protocol follows the specifications of the Telnet\n   protocol for all communications over the control connection.  Since\n   the language used for Telnet communication may be a negotiated\n   option, all references in the next two sections will be to the\n   \"Telnet language\" and the corresponding \"Telnet end-of-line code\".\n   Currently, one may take these to mean NVT-ASCII and <CRLF>.  No other\n   specifications of the Telnet protocol will be cited.\n\n   FTP commands are \"Telnet strings\" terminated by the \"Telnet end of\n   line code\".  The command codes themselves are alphabetic characters\n   terminated by the character <SP> (Space) if parameters follow and\n   Telnet-EOL otherwise.  The command codes and the semantics of\n   commands are described in this section; the detailed syntax of\n   commands is specified in the Section on Commands, the reply sequences\n   are discussed in the Section on Sequencing of Commands and Replies,\n   and scenarios illustrating the use of commands are provided in the\n   Section on Typical FTP Scenarios.\n\n   FTP commands may be partitioned as those specifying access-control\n   identifiers, data transfer parameters, or FTP service requests.\n   Certain commands (such as ABOR, STAT, QUIT) may be sent over the\n   control connection while a data transfer is in progress.  Some\n\n\n\n   servers may not be able to monitor the control and data connections\n   simultaneously, in which case some special action will be necessary\n   to get the server's attention.  The following ordered format is\n   tentatively recommended:\n\n      1. User system inserts the Telnet \"Interrupt Process\" (IP) signal\n      in the Telnet stream.\n\n      2. User system sends the Telnet \"Synch\" signal.\n\n      3. User system inserts the command (e.g., ABOR) in the Telnet\n      stream.\n\n      4. Server PI, after receiving \"IP\", scans the Telnet stream for\n      EXACTLY ONE FTP command.\n\n   (For other servers this may not be necessary but the actions listed\n   above should have no unusual effect.)\n\n   4.2.  FTP REPLIES\n\n      Replies to File Transfer Protocol commands are devised to ensure\n      the synchronization of requests and actions in the process of file\n      transfer, and to guarantee that the user process always knows the\n      state of the Server.  Every command must generate at least one\n      reply, although there may be more than one; in the latter case,\n      the multiple replies must be easily distinguished.  In addition,\n      some commands occur in sequential groups, such as USER, PASS and\n      ACCT, or RNFR and RNTO.  The replies show the existence of an\n      intermediate state if all preceding commands have been successful.\n      A failure at any point in the sequence necessitates the repetition\n      of the entire sequence from the beginning.\n\n         The details of the command-reply sequence are made explicit in\n         a set of state diagrams below.\n\n      An FTP reply consists of a three digit number (transmitted as\n      three alphanumeric characters) followed by some text.  The number\n      is intended for use by automata to determine what state to enter\n      next; the text is intended for the human user.  It is intended\n      that the three digits contain enough encoded information that the\n      user-process (the User-PI) will not need to examine the text and\n      may either discard it or pass it on to the user, as appropriate.\n      In particular, the text may be server-dependent, so there are\n      likely to be varying texts for each reply code.\n\n      A reply is defined to contain the 3-digit code, followed by Space\n\n\n\n      <SP>, followed by one line of text (where some maximum line length\n      has been specified), and terminated by the Telnet end-of-line\n      code.  There will be cases however, where the text is longer than\n      a single line.  In these cases the complete text must be bracketed\n      so the User-process knows when it may stop reading the reply (i.e.\n      stop processing input on the control connection) and go do other\n      things.  This requires a special format on the first line to\n      indicate that more than one line is coming, and another on the\n      last line to designate it as the last.  At least one of these must\n      contain the appropriate reply code to indicate the state of the\n      transaction.  To satisfy all factions, it was decided that both\n      the first and last line codes should be the same.\n\n         Thus the format for multi-line replies is that the first line\n         will begin with the exact required reply code, followed\n         immediately by a Hyphen, \"-\" (also known as Minus), followed by\n         text.  The last line will begin with the same code, followed\n         immediately by Space <SP>, optionally some text, and the Telnet\n         end-of-line code.\n\n            For example:\n                                123-First line\n                                Second line\n                                  234 A line beginning with numbers\n                                123 The last line\n\n         The user-process then simply needs to search for the second\n         occurrence of the same reply code, followed by <SP> (Space), at\n         the beginning of a line, and ignore all intermediary lines.  If\n         an intermediary line begins with a 3-digit number, the Server\n         must pad the front  to avoid confusion.\n\n            This scheme allows standard system routines to be used for\n            reply information (such as for the STAT reply), with\n            \"artificial\" first and last lines tacked on.  In rare cases\n            where these routines are able to generate three digits and a\n            Space at the beginning of any line, the beginning of each\n            text line should be offset by some neutral text, like Space.\n\n         This scheme assumes that multi-line replies may not be nested.\n\n      The three digits of the reply each have a special significance.\n      This is intended to allow a range of very simple to very\n      sophisticated responses by the user-process.  The first digit\n      denotes whether the response is good, bad or incomplete.\n      (Referring to the state diagram), an unsophisticated user-process\n      will be able to determine its next action (proceed as planned,\n\n\n\n      redo, retrench, etc.) by simply examining this first digit.  A\n      user-process that wants to know approximately what kind of error\n      occurred (e.g. file system error, command syntax error) may\n      examine the second digit, reserving the third digit for the finest\n      gradation of information (e.g., RNTO command without a preceding\n      RNFR).\n\n         There are five values for the first digit of the reply code:\n\n            1yz   Positive Preliminary reply\n\n               The requested action is being initiated; expect another\n               reply before proceeding with a new command.  (The\n               user-process sending another command before the\n               completion reply would be in violation of protocol; but\n               server-FTP processes should queue any commands that\n               arrive while a preceding command is in progress.)  This\n               type of reply can be used to indicate that the command\n               was accepted and the user-process may now pay attention\n               to the data connections, for implementations where\n               simultaneous monitoring is difficult.  The server-FTP\n               process may send at most, one 1yz reply per command.\n\n            2yz   Positive Completion reply\n\n               The requested action has been successfully completed.  A\n               new request may be initiated.\n\n            3yz   Positive Intermediate reply\n\n               The command has been accepted, but the requested action\n               is being held in abeyance, pending receipt of further\n               information.  The user should send another command\n               specifying this information.  This reply is used in\n               command sequence groups.\n\n            4yz   Transient Negative Completion reply\n\n               The command was not accepted and the requested action did\n               not take place, but the error condition is temporary and\n               the action may be requested again.  The user should\n               return to the beginning of the command sequence, if any.\n               It is difficult to assign a meaning to \"transient\",\n               particularly when two distinct sites (Server- and\n               User-processes) have to agree on the interpretation.\n               Each reply in the 4yz category might have a slightly\n               different time value, but the intent is that the\n\n\n\n               user-process is encouraged to try again.  A rule of thumb\n               in determining if a reply fits into the 4yz or the 5yz\n               (Permanent Negative) category is that replies are 4yz if\n               the commands can be repeated without any change in\n               command form or in properties of the User or Server\n               (e.g., the command is spelled the same with the same\n               arguments used; the user does not change his file access\n               or user name; the server does not put up a new\n               implementation.)\n\n            5yz   Permanent Negative Completion reply\n\n               The command was not accepted and the requested action did\n               not take place.  The User-process is discouraged from\n               repeating the exact request (in the same sequence).  Even\n               some \"permanent\" error conditions can be corrected, so\n               the human user may want to direct his User-process to\n               reinitiate the command sequence by direct action at some\n               point in the future (e.g., after the spelling has been\n               changed, or the user has altered his directory status.)\n\n         The following function groupings are encoded in the second\n         digit:\n\n            x0z   Syntax - These replies refer to syntax errors,\n                  syntactically correct commands that don't fit any\n                  functional category, unimplemented or superfluous\n                  commands.\n\n            x1z   Information -  These are replies to requests for\n                  information, such as status or help.\n\n            x2z   Connections - Replies referring to the control and\n                  data connections.\n\n            x3z   Authentication and accounting - Replies for the login\n                  process and accounting procedures.\n\n            x4z   Unspecified as yet.\n\n            x5z   File system - These replies indicate the status of the\n                  Server file system vis-a-vis the requested transfer or\n                  other file system action.\n\n         The third digit gives a finer gradation of meaning in each of\n         the function categories, specified by the second digit.  The\n         list of replies below will illustrate this.  Note that the text\n\n\n\n         associated with each reply is recommended, rather than\n         mandatory, and may even change according to the command with\n         which it is associated.  The reply codes, on the other hand,\n         must strictly follow the specifications in the last section;\n         that is, Server implementations should not invent new codes for\n         situations that are only slightly different from the ones\n         described here, but rather should adapt codes already defined.\n\n            A command such as TYPE or ALLO whose successful execution\n            does not offer the user-process any new information will\n            cause a 200 reply to be returned.  If the command is not\n            implemented by a particular Server-FTP process because it\n            has no relevance to that computer system, for example ALLO\n            at a TOPS20 site, a Positive Completion reply is still\n            desired so that the simple User-process knows it can proceed\n            with its course of action.  A 202 reply is used in this case\n            with, for example, the reply text:  \"No storage allocation\n            necessary.\"  If, on the other hand, the command requests a\n            non-site-specific action and is unimplemented, the response\n            is 502.  A refinement of that is the 504 reply for a command\n            that is implemented, but that requests an unimplemented\n            parameter.\n\n      4.2.1  Reply Codes by Function Groups\n\n         200 Command okay.\n         500 Syntax error, command unrecognized.\n             This may include errors such as command line too long.\n         501 Syntax error in parameters or arguments.\n         202 Command not implemented, superfluous at this site.\n         502 Command not implemented.\n         503 Bad sequence of commands.\n         504 Command not implemented for that parameter.\n          \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n         110 Restart marker reply.\n             In this case, the text is exact and not left to the\n             particular implementation; it must read:\n                  MARK yyyy = mmmm\n             Where yyyy is User-process data stream marker, and mmmm\n             server's equivalent marker (note the spaces between markers\n             and \"=\").\n         211 System status, or system help reply.\n         212 Directory status.\n         213 File status.\n         214 Help message.\n             On how to use the server or the meaning of a particular\n             non-standard command.  This reply is useful only to the\n             human user.\n         215 NAME system type.\n             Where NAME is an official system name from the list in the\n             Assigned Numbers document.\n          \n         120 Service ready in nnn minutes.\n         220 Service ready for new user.\n         221 Service closing control connection.\n             Logged out if appropriate.\n         421 Service not available, closing control connection.\n             This may be a reply to any command if the service knows it\n             must shut down.\n         125 Data connection already open; transfer starting.\n         225 Data connection open; no transfer in progress.\n         425 Can't open data connection.\n         226 Closing data connection.\n             Requested file action successful (for example, file\n             transfer or file abort).\n         426 Connection closed; transfer aborted.\n         227 Entering Passive Mode (h1,h2,h3,h4,p1,p2).\n          \n         230 User logged in, proceed.\n         530 Not logged in.\n         331 User name okay, need password.\n         332 Need account for login.\n         532 Need account for storing files.\n          \n\n\n\n\n\n\n\n\n\n\n         150 File status okay; about to open data connection.\n         250 Requested file action okay, completed.\n         257 \"PATHNAME\" created.\n         350 Requested file action pending further information.\n         450 Requested file action not taken.\n             File unavailable (e.g., file busy).\n         550 Requested action not taken.\n             File unavailable (e.g., file not found, no access).\n         451 Requested action aborted. Local error in processing.\n         551 Requested action aborted. Page type unknown.\n         452 Requested action not taken.\n             Insufficient storage space in system.\n         552 Requested file action aborted.\n             Exceeded storage allocation (for current directory or\n             dataset).\n         553 Requested action not taken.\n             File name not allowed.\n         \n\n      4.2.2 Numeric  Order List of Reply Codes\n\n         110 Restart marker reply.\n             In this case, the text is exact and not left to the\n             particular implementation; it must read:\n                  MARK yyyy = mmmm\n             Where yyyy is User-process data stream marker, and mmmm\n             server's equivalent marker (note the spaces between markers\n             and \"=\").\n         120 Service ready in nnn minutes.\n         125 Data connection already open; transfer starting.\n         150 File status okay; about to open data connection.\n          \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n         200 Command okay.\n         202 Command not implemented, superfluous at this site.\n         211 System status, or system help reply.\n         212 Directory status.\n         213 File status.\n         214 Help message.\n             On how to use the server or the meaning of a particular\n             non-standard command.  This reply is useful only to the\n             human user.\n         215 NAME system type.\n             Where NAME is an official system name from the list in the\n             Assigned Numbers document.\n         220 Service ready for new user.\n         221 Service closing control connection.\n             Logged out if appropriate.\n         225 Data connection open; no transfer in progress.\n         226 Closing data connection.\n             Requested file action successful (for example, file\n             transfer or file abort).\n         227 Entering Passive Mode (h1,h2,h3,h4,p1,p2).\n         230 User logged in, proceed.\n         250 Requested file action okay, completed.\n         257 \"PATHNAME\" created.\n          \n         331 User name okay, need password.\n         332 Need account for login.\n         350 Requested file action pending further information.\n          \n         421 Service not available, closing control connection.\n             This may be a reply to any command if the service knows it\n             must shut down.\n         425 Can't open data connection.\n         426 Connection closed; transfer aborted.\n         450 Requested file action not taken.\n             File unavailable (e.g., file busy).\n         451 Requested action aborted: local error in processing.\n         452 Requested action not taken.\n             Insufficient storage space in system.\n          \n\n\n\n\n\n\n\n\n\n\n\n         500 Syntax error, command unrecognized.\n             This may include errors such as command line too long.\n         501 Syntax error in parameters or arguments.\n         502 Command not implemented.\n         503 Bad sequence of commands.\n         504 Command not implemented for that parameter.\n         530 Not logged in.\n         532 Need account for storing files.\n         550 Requested action not taken.\n             File unavailable (e.g., file not found, no access).\n         551 Requested action aborted: page type unknown.\n         552 Requested file action aborted.\n             Exceeded storage allocation (for current directory or\n             dataset).\n         553 Requested action not taken.\n             File name not allowed.\n         "
  },
  {
    "section_number": "5.",
    "section_name": "DECLARATIVE SPECIFICATIONS",
    "tag": "Section 5. DECLARATIVE SPECIFICATIONS",
    "content": "\n   5.1.  MINIMUM IMPLEMENTATION\n\n      In order to make FTP workable without needless error messages, the\n      following minimum implementation is required for all servers:\n\n         TYPE - ASCII Non-print\n         MODE - Stream\n         STRUCTURE - File, Record\n         COMMANDS - USER, QUIT, PORT,\n                    TYPE, MODE, STRU,\n                      for the default values\n                    RETR, STOR,\n                    NOOP.\n\n      The default values for transfer parameters are:\n\n         TYPE - ASCII Non-print\n         MODE - Stream\n         STRU - File\n\n      All hosts must accept the above as the standard defaults.\n\n\n\n\n\n\n\n\n\n   5.2.  CONNECTIONS\n\n      The server protocol interpreter shall \"listen\" on Port L.  The\n      user or user protocol interpreter shall initiate the full-duplex\n      control connection.  Server- and user- processes should follow the\n      conventions of the Telnet protocol as specified in the\n      ARPA-Internet Protocol Handbook [1].  Servers are under no\n      obligation to provide for editing of command lines and may require\n      that it be done in the user host.  The control connection shall be\n      closed by the server at the user's request after all transfers and\n      replies are completed.\n\n      The user-DTP must \"listen\" on the specified data port; this may be\n      the default user port (U) or a port specified in the PORT command.\n      The server shall initiate the data connection from his own default\n      data port (L-1) using the specified user data port.  The direction\n      of the transfer and the port used will be determined by the FTP\n      service command.\n\n      Note that all FTP implementation must support data transfer using\n      the default port, and that only the USER-PI may initiate the use\n      of non-default ports.\n\n      When data is to be transferred between two servers, A and B (refer\n      to Figure 2), the user-PI, C, sets up control connections with\n      both server-PI's.  One of the servers, say A, is then sent a PASV\n      command telling him to \"listen\" on his data port rather than\n      initiate a connection when he receives a transfer service command.\n      When the user-PI receives an acknowledgment to the PASV command,\n      which includes the identity of the host and port being listened\n      on, the user-PI then sends A's port, a, to B in a PORT command; a\n      reply is returned.  The user-PI may then send the corresponding\n      service commands to A and B.  Server B initiates the connection\n      and the transfer proceeds.  The command-reply sequence is listed\n      below where the messages are vertically synchronous but\n      horizontally asynchronous:\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n         User-PI - Server A                User-PI - Server B\n         ------------------                ------------------\n         \n         C->A : Connect                    C->B : Connect\n         C->A : PASV\n         A->C : 227 Entering Passive Mode. A1,A2,A3,A4,a1,a2\n                                           C->B : PORT A1,A2,A3,A4,a1,a2\n                                           B->C : 200 Okay\n         C->A : STOR                       C->B : RETR\n                    B->A : Connect to HOST-A, PORT-a\n\n                                Figure 3\n\n      The data connection shall be closed by the server under the\n      conditions described in the Section on Establishing Data\n      Connections.  If the data connection is to be closed following a\n      data transfer where closing the connection is not required to\n      indicate the end-of-file, the server must do so immediately.\n      Waiting until after a new transfer command is not permitted\n      because the user-process will have already tested the data\n      connection to see if it needs to do a \"listen\"; (remember that the\n      user must \"listen\" on a closed data port BEFORE sending the\n      transfer request).  To prevent a race condition here, the server\n      sends a reply (226) after closing the data connection (or if the\n      connection is left open, a \"file transfer completed\" reply (250)\n      and the user-PI should wait for one of these replies before\n      issuing a new transfer command).\n\n      Any time either the user or server see that the connection is\n      being closed by the other side, it should promptly read any\n      remaining data queued on the connection and issue the close on its\n      own side.\n\n   5.3.  COMMANDS\n\n      The commands are Telnet character strings transmitted over the\n      control connections as described in the Section on FTP Commands.\n      The command functions and semantics are described in the Section\n      on Access Control Commands, Transfer Parameter Commands, FTP\n      Service Commands, and Miscellaneous Commands.  The command syntax\n      is specified here.\n\n      The commands begin with a command code followed by an argument\n      field.  The command codes are four or fewer alphabetic characters.\n      Upper and lower case alphabetic characters are to be treated\n      identically.  Thus, any of the following may represent the\n      retrieve command:\n\n\n\n                  RETR    Retr    retr    ReTr    rETr\n\n      This also applies to any symbols representing parameter values,\n      such as A or a for ASCII TYPE.  The command codes and the argument\n      fields are separated by one or more spaces.\n\n      The argument field consists of a variable length character string\n      ending with the character sequence <CRLF> (Carriage Return, Line\n      Feed) for NVT-ASCII representation; for other negotiated languages\n      a different end of line character might be used.  It should be\n      noted that the server is to take no action until the end of line\n      code is received.\n\n      The syntax is specified below in NVT-ASCII.  All characters in the\n      argument field are ASCII characters including any ASCII\n      represented decimal integers.  Square brackets denote an optional\n      argument field.  If the option is not taken, the appropriate\n      default is implied.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n      5.3.1.  FTP COMMANDS\n\n         The following are the FTP commands:\n\n            USER <SP> <username> <CRLF>\n            PASS <SP> <password> <CRLF>\n            ACCT <SP> <account-information> <CRLF>\n            CWD  <SP> <pathname> <CRLF>\n            CDUP <CRLF>\n            SMNT <SP> <pathname> <CRLF>\n            QUIT <CRLF>\n            REIN <CRLF>\n            PORT <SP> <host-port> <CRLF>\n            PASV <CRLF>\n            TYPE <SP> <type-code> <CRLF>\n            STRU <SP> <structure-code> <CRLF>\n            MODE <SP> <mode-code> <CRLF>\n            RETR <SP> <pathname> <CRLF>\n            STOR <SP> <pathname> <CRLF>\n            STOU <CRLF>\n            APPE <SP> <pathname> <CRLF>\n            ALLO <SP> <decimal-integer>\n                [<SP> R <SP> <decimal-integer>] <CRLF>\n            REST <SP> <marker> <CRLF>\n            RNFR <SP> <pathname> <CRLF>\n            RNTO <SP> <pathname> <CRLF>\n            ABOR <CRLF>\n            DELE <SP> <pathname> <CRLF>\n            RMD  <SP> <pathname> <CRLF>\n            MKD  <SP> <pathname> <CRLF>\n            PWD  <CRLF>\n            LIST [<SP> <pathname>] <CRLF>\n            NLST [<SP> <pathname>] <CRLF>\n            SITE <SP> <string> <CRLF>\n            SYST <CRLF>\n            STAT [<SP> <pathname>] <CRLF>\n            HELP [<SP> <string>] <CRLF>\n            NOOP <CRLF>\n\n\n\n\n\n\n\n\n\n\n\n\n      5.3.2.  FTP COMMAND ARGUMENTS\n\n         The syntax of the above argument fields (using BNF notation\n         where applicable) is:\n\n            <username> ::= <string>\n            <password> ::= <string>\n            <account-information> ::= <string>\n            <string> ::= <char> | <char><string>\n            <char> ::= any of the 128 ASCII characters except <CR> and\n            <LF>\n            <marker> ::= <pr-string>\n            <pr-string> ::= <pr-char> | <pr-char><pr-string>\n            <pr-char> ::= printable characters, any\n                          ASCII code 33 through 126\n            <byte-size> ::= <number>\n            <host-port> ::= <host-number>,<port-number>\n            <host-number> ::= <number>,<number>,<number>,<number>\n            <port-number> ::= <number>,<number>\n            <number> ::= any decimal integer 1 through 255\n            <form-code> ::= N | T | C\n            <type-code> ::= A [<sp> <form-code>]\n                          | E [<sp> <form-code>]\n                          | I\n                          | L <sp> <byte-size>\n            <structure-code> ::= F | R | P\n            <mode-code> ::= S | B | C\n            <pathname> ::= <string>\n            <decimal-integer> ::= any decimal integer\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n   5.4.  SEQUENCING OF COMMANDS AND REPLIES\n\n      The communication between the user and server is intended to be an\n      alternating dialogue.  As such, the user issues an FTP command and\n      the server responds with a prompt primary reply.  The user should\n      wait for this initial primary success or failure response before\n      sending further commands.\n\n      Certain commands require a second reply for which the user should\n      also wait.  These replies may, for example, report on the progress\n      or completion of file transfer or the closing of the data\n      connection.  They are secondary replies to file transfer commands.\n\n      One important group of informational replies is the connection\n      greetings.  Under normal circumstances, a server will send a 220\n      reply, \"awaiting input\", when the connection is completed.  The\n      user should wait for this greeting message before sending any\n      commands.  If the server is unable to accept input right away, a\n      120 \"expected delay\" reply should be sent immediately and a 220\n      reply when ready.  The user will then know not to hang up if there\n      is a delay.\n\n      Spontaneous Replies\n\n         Sometimes \"the system\" spontaneously has a message to be sent\n         to a user (usually all users).  For example, \"System going down\n         in 15 minutes\".  There is no provision in FTP for such\n         spontaneous information to be sent from the server to the user.\n         It is recommended that such information be queued in the\n         server-PI and delivered to the user-PI in the next reply\n         (possibly making it a multi-line reply).\n\n      The table below lists alternative success and failure replies for\n      each command.  These must be strictly adhered to; a server may\n      substitute text in the replies, but the meaning and action implied\n      by the code numbers and by the specific command reply sequence\n      cannot be altered.\n\n      Command-Reply Sequences\n\n         In this section, the command-reply sequence is presented.  Each\n         command is listed with its possible replies; command groups are\n         listed together.  Preliminary replies are listed first (with\n         their succeeding replies indented and under them), then\n         positive and negative completion, and finally intermediary\n\n\n\n\n\n         replies with the remaining commands from the sequence\n         following.  This listing forms the basis for the state\n         diagrams, which will be presented separately.\n\n            Connection Establishment\n               120\n                  220\n               220\n               421\n            Login\n               USER\n                  230\n                  530\n                  500, 501, 421\n                  331, 332\n               PASS\n                  230\n                  202\n                  530\n                  500, 501, 503, 421\n                  332\n               ACCT\n                  230\n                  202\n                  530\n                  500, 501, 503, 421\n               CWD\n                  250\n                  500, 501, 502, 421, 530, 550\n               CDUP\n                  200\n                  500, 501, 502, 421, 530, 550\n               SMNT\n                  202, 250\n                  500, 501, 502, 421, 530, 550\n            Logout\n               REIN\n                  120\n                     220\n                  220\n                  421\n                  500, 502\n               QUIT\n                  221\n                  500\n\n\n\n\n\n            Transfer parameters\n               PORT\n                  200\n                  500, 501, 421, 530\n               PASV\n                  227\n                  500, 501, 502, 421, 530\n               MODE\n                  200\n                  500, 501, 504, 421, 530\n               TYPE\n                  200\n                  500, 501, 504, 421, 530\n               STRU\n                  200\n                  500, 501, 504, 421, 530\n            File action commands\n               ALLO\n                  200\n                  202\n                  500, 501, 504, 421, 530\n               REST\n                  500, 501, 502, 421, 530\n                  350\n               STOR\n                  125, 150\n                     (110)\n                     226, 250\n                     425, 426, 451, 551, 552\n                  532, 450, 452, 553\n                  500, 501, 421, 530\n               STOU\n                  125, 150\n                     (110)\n                     226, 250\n                     425, 426, 451, 551, 552\n                  532, 450, 452, 553\n                  500, 501, 421, 530\n               RETR\n                  125, 150\n                     (110)\n                     226, 250\n                     425, 426, 451\n                  450, 550\n                  500, 501, 421, 530\n\n\n\n\n\n               LIST\n                  125, 150\n                     226, 250\n                     425, 426, 451\n                  450\n                  500, 501, 502, 421, 530\n               NLST\n                  125, 150\n                     226, 250\n                     425, 426, 451\n                  450\n                  500, 501, 502, 421, 530\n               APPE\n                  125, 150\n                     (110)\n                     226, 250\n                     425, 426, 451, 551, 552\n                  532, 450, 550, 452, 553\n                  500, 501, 502, 421, 530\n               RNFR\n                  450, 550\n                  500, 501, 502, 421, 530\n                  350\n               RNTO\n                  250\n                  532, 553\n                  500, 501, 502, 503, 421, 530\n               DELE\n                  250\n                  450, 550\n                  500, 501, 502, 421, 530\n               RMD\n                  250\n                  500, 501, 502, 421, 530, 550\n               MKD\n                  257\n                  500, 501, 502, 421, 530, 550\n               PWD\n                  257\n                  500, 501, 502, 421, 550\n               ABOR\n                  225, 226\n                  500, 501, 502, 421\n\n\n\n\n\n\n\n            Informational commands\n               SYST\n                  215\n                  500, 501, 502, 421\n               STAT\n                  211, 212, 213\n                  450\n                  500, 501, 502, 421, 530\n               HELP\n                  211, 214\n                  500, 501, 502, 421\n            Miscellaneous commands\n               SITE\n                  200\n                  202\n                  500, 501, 530\n               NOOP\n                  200\n                  500 421"
  },
  {
    "section_number": "6.",
    "section_name": "STATE DIAGRAMS",
    "tag": "Section 6. STATE DIAGRAMS",
    "content": "\n   Here we present state diagrams for a very simple minded FTP\n   implementation.  Only the first digit of the reply codes is used.\n   There is one state diagram for each group of FTP commands or command\n   sequences.\n\n   The command groupings were determined by constructing a model for\n   each command then collecting together the commands with structurally\n   identical models.\n\n   For each command or command sequence there are three possible\n   outcomes: success (S), failure (F), and error (E).  In the state\n   diagrams below we use the symbol B for \"begin\", and the symbol W for\n   \"wait for reply\".\n\n   We first present the diagram that represents the largest group of FTP\n   commands:\n\n      \n                               1,3    +---+\n                          ----------->| E |\n                         |            +---+\n                         |\n      +---+    cmd    +---+    2      +---+\n      | B |---------->| W |---------->| S |\n      +---+           +---+           +---+\n                         |\n                         |     4,5    +---+\n                          ----------->| F |\n                                      +---+\n      \n\n      This diagram models the commands:\n\n         ABOR, ALLO, DELE, CWD, CDUP, SMNT, HELP, MODE, NOOP, PASV,\n         QUIT, SITE, PORT, SYST, STAT, RMD, MKD, PWD, STRU, and TYPE.\n\n\n\n\n\n\n\n\n\n\n\n\n\n   The other large group of commands is represented by a very similar\n   diagram:\n\n      \n                               3      +---+\n                          ----------->| E |\n                         |            +---+\n                         |\n      +---+    cmd    +---+    2      +---+\n      | B |---------->| W |---------->| S |\n      +---+       --->+---+           +---+\n                 |     | |\n                 |     | |     4,5    +---+\n                 |  1  |  ----------->| F |\n                  -----               +---+\n      \n\n      This diagram models the commands:\n\n         APPE, LIST, NLST, REIN, RETR, STOR, and STOU.\n\n   Note that this second model could also be used to represent the first\n   group of commands, the only difference being that in the first group\n   the 100 series replies are unexpected and therefore treated as error,\n   while the second group expects (some may require) 100 series replies.\n   Remember that at most, one 100 series reply is allowed per command.\n\n   The remaining diagrams model command sequences, perhaps the simplest\n   of these is the rename sequence:\n\n      \n      +---+   RNFR    +---+    1,2    +---+\n      | B |---------->| W |---------->| E |\n      +---+           +---+        -->+---+\n                       | |        |\n                3      | | 4,5    |\n         --------------  ------   |\n        |                      |  |   +---+\n        |               ------------->| S |\n        |              |   1,3 |  |   +---+\n        |             2|  --------\n        |              | |     |\n        V              | |     |\n      +---+   RNTO    +---+ 4,5 ----->+---+\n      |   |---------->| W |---------->| F |\n      +---+           +---+           +---+\n      \n\n\n\n   The next diagram is a simple model of the Restart command:\n\n      \n      +---+   REST    +---+    1,2    +---+\n      | B |---------->| W |---------->| E |\n      +---+           +---+        -->+---+\n                       | |        |\n                3      | | 4,5    |\n         --------------  ------   |\n        |                      |  |   +---+\n        |               ------------->| S |\n        |              |   3   |  |   +---+\n        |             2|  --------\n        |              | |     |\n        V              | |     |\n      +---+   cmd     +---+ 4,5 ----->+---+\n      |   |---------->| W |---------->| F |\n      +---+        -->+---+           +---+\n                  |      |\n                  |  1   |\n                   ------\n      \n\n         Where \"cmd\" is APPE, STOR, or RETR.\n\n   We note that the above three models are similar.  The Restart differs\n   from the Rename two only in the treatment of 100 series replies at\n   the second stage, while the second group expects (some may require)\n   100 series replies.  Remember that at most, one 100 series reply is\n   allowed per command.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n   The most complicated diagram is for the Login sequence:\n\n      \n                            1\n      +---+   USER    +---+------------->+---+\n      | B |---------->| W | 2       ---->| E |\n      +---+           +---+------  |  -->+---+\n                       | |       | | |\n                     3 | | 4,5   | | |\n         --------------   -----  | | |\n        |                      | | | |\n        |                      | | | |\n        |                 ---------  |\n        |               1|     | |   |\n        V                |     | |   |\n      +---+   PASS    +---+ 2  |  ------>+---+\n      |   |---------->| W |------------->| S |\n      +---+           +---+   ---------->+---+\n                       | |   | |     |\n                     3 | |4,5| |     |\n         --------------   --------   |\n        |                    | |  |  |\n        |                    | |  |  |\n        |                 -----------\n        |             1,3|   | |  |\n        V                |  2| |  |\n      +---+   ACCT    +---+--  |   ----->+---+\n      |   |---------->| W | 4,5 -------->| F |\n      +---+           +---+------------->+---+\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n   Finally, we present a generalized diagram that could be used to model\n   the command and reply interchange:\n\n      \n               ------------------------------------\n              |                                    |\n      Begin   |                                    |\n        |     V                                    |\n        |   +---+  cmd   +---+ 2         +---+     |\n         -->|   |------->|   |---------->|   |     |\n            |   |        | W |           | S |-----|\n         -->|   |     -->|   |-----      |   |     |\n        |   +---+    |   +---+ 4,5 |     +---+     |\n        |     |      |    | |      |               |\n        |     |      |   1| |3     |     +---+     |\n        |     |      |    | |      |     |   |     |\n        |     |       ----  |       ---->| F |-----\n        |     |             |            |   |\n        |     |             |            +---+\n         -------------------\n              |\n              |\n              V\n             End\n      "
  },
  {
    "section_number": "7.",
    "section_name": "TYPICAL FTP SCENARIO",
    "tag": "Section 7. TYPICAL FTP SCENARIO",
    "content": "\n   User at host U wanting to transfer files to/from host S:\n\n   In general, the user will communicate to the server via a mediating\n   user-FTP process.  The following may be a typical scenario.  The\n   user-FTP prompts are shown in parentheses, '---->' represents\n   commands from host U to host S, and '<----' represents replies from\n   host S to host U.\n\n      LOCAL COMMANDS BY USER              ACTION INVOLVED\n\n      ftp (host) multics<CR>         Connect to host S, port L,\n                                     establishing control connections.\n                                     <---- 220 Service ready <CRLF>.\n      username Doe <CR>              USER Doe<CRLF>---->\n                                     <---- 331 User name ok,\n                                               need password<CRLF>.\n      password mumble <CR>           PASS mumble<CRLF>---->\n                                     <---- 230 User logged in<CRLF>.\n      retrieve (local type) ASCII<CR>\n      (local pathname) test 1 <CR>   User-FTP opens local file in ASCII.\n      (for. pathname) test.pl1<CR>   RETR test.pl1<CRLF> ---->\n                                     <---- 150 File status okay;\n                                           about to open data\n                                           connection<CRLF>.\n                                     Server makes data connection\n                                     to port U.\n      \n                                     <---- 226 Closing data connection,\n                                         file transfer successful<CRLF>.\n      type Image<CR>                 TYPE I<CRLF> ---->\n                                     <---- 200 Command OK<CRLF>\n      store (local type) image<CR>\n      (local pathname) file dump<CR> User-FTP opens local file in Image.\n      (for.pathname) >udd>cn>fd<CR>  STOR >udd>cn>fd<CRLF> ---->\n                                     <---- 550 Access denied<CRLF>\n      terminate                      QUIT <CRLF> ---->\n                                     Server closes all\n                                     connections."
  },
  {
    "section_number": "8.",
    "section_name": "CONNECTION ESTABLISHMENT",
    "tag": "Section 8. CONNECTION ESTABLISHMENT",
    "content": "\n   The FTP control connection is established via TCP between the user\n   process port U and the server process port L.  This protocol is\n   assigned the service port 21 (25 octal), that is L=21."
  },
  {
    "section_number": "APPENDIX I",
    "section_name": "PAGE STRUCTURE",
    "tag": "Section APPENDIX I PAGE STRUCTURE",
    "content": "\n   The need for FTP to support page structure derives principally from\n   the  need to support efficient transmission of files between TOPS-20\n   systems, particularly the files used by NLS.\n\n   The file system of TOPS-20 is based on the concept of pages.  The\n   operating system is most efficient at manipulating files as pages.\n   The operating system provides an interface to the file system so that\n   many applications view files as sequential streams of characters.\n   However, a few applications use the underlying page structures\n   directly, and some of these create holey files.\n\n   A TOPS-20 disk file consists of four things: a pathname, a page\n   table, a (possibly empty) set of pages, and a set of attributes.\n\n   The pathname is specified in the RETR or STOR command.  It includes\n   the directory name, file name, file name extension, and generation\n   number.\n\n   The page table contains up to 2**18 entries.  Each entry may be\n   EMPTY, or may point to a page.  If it is not empty, there are also\n   some page-specific access bits; not all pages of a file need have the\n   same access protection.\n\n      A page is a contiguous set of 512 words of 36 bits each.\n\n   The attributes of the file, in the File Descriptor Block (FDB),\n   contain such things as creation time, write time, read time, writer's\n   byte-size, end-of-file pointer, count of reads and writes, backup\n   system tape numbers, etc.\n\n   Note that there is NO requirement that entries in the page table be\n   contiguous.  There may be empty page table slots between occupied\n   ones.  Also, the end of file pointer is simply a number.  There is no\n   requirement that it in fact point at the \"last\" datum in the file.\n   Ordinary sequential I/O calls in TOPS-20 will cause the end of file\n   pointer to be left after the last datum written, but other operations\n   may cause it not to be so, if a particular programming system so\n   requires.\n\n   In fact, in both of these special cases, \"holey\" files and\n   end-of-file pointers NOT at the end of the file, occur with NLS data\n   files.\n\n\n\n\n\n\n   The TOPS-20 paged files can be sent with the FTP transfer parameters:\n   TYPE L 36, STRU P, and MODE S (in fact, any mode could be used).\n\n   Each page of information has a header.  Each header field, which is a\n   logical byte, is a TOPS-20 word, since the TYPE is L 36.\n\n   The header fields are:\n\n      Word 0: Header Length.\n\n         The header length is 5.\n\n      Word 1: Page Index.\n\n         If the data is a disk file page, this is the number of that\n         page in the file's page map.  Empty pages (holes) in the file\n         are simply not sent.  Note that a hole is NOT the same as a\n         page of zeros.\n\n      Word 2: Data Length.\n\n         The number of data words in this page, following the header.\n         Thus, the total length of the transmission unit is the Header\n         Length plus the Data Length.\n\n      Word 3: Page Type.\n\n         A code for what type of chunk this is.  A data page is type 3,\n         the FDB page is type 2.\n\n      Word 4: Page Access Control.\n\n         The access bits associated with the page in the file's page\n         map.  (This full word quantity is put into AC2 of an SPACS by\n         the program reading from net to disk.)\n\n   After the header are Data Length data words.  Data Length is\n   currently either 512 for a data page or 31 for an FDB.  Trailing\n   zeros in a disk file page may be discarded, making Data Length less\n   than 512 in that case."
  },
  {
    "section_number": "APPENDIX II",
    "section_name": "DIRECTORY COMMANDS",
    "tag": "Section APPENDIX II DIRECTORY COMMANDS",
    "content": "\n   Since UNIX has a tree-like directory structure in which directories\n   are as easy to manipulate as ordinary files, it is useful to expand\n   the FTP servers on these machines to include commands which deal with\n   the creation of directories.  Since there are other hosts on the\n   ARPA-Internet which have tree-like directories (including TOPS-20 and\n   Multics), these commands are as general as possible.\n\n      Four directory commands have been added to FTP:\n\n         MKD pathname\n\n            Make a directory with the name \"pathname\".\n\n         RMD pathname\n\n            Remove the directory with the name \"pathname\".\n\n         PWD\n\n            Print the current working directory name.\n\n         CDUP\n\n            Change to the parent of the current working directory.\n\n   The  \"pathname\"  argument should be created (removed) as a\n   subdirectory of the current working directory, unless the \"pathname\"\n   string contains sufficient information to specify otherwise to the\n   server, e.g., \"pathname\" is an absolute pathname (in UNIX and\n   Multics), or pathname is something like \"<abso.lute.path>\" to\n   TOPS-20.\n\n   REPLY CODES\n\n      The CDUP command is a special case of CWD, and is included to\n      simplify the implementation of programs for transferring directory\n      trees between operating systems having different syntaxes for\n      naming the parent directory.  The reply codes for CDUP be\n      identical to the reply codes of CWD.\n\n      The reply codes for RMD be identical to the reply codes for its\n      file analogue, DELE.\n\n      The reply codes for MKD, however, are a bit more complicated.  A\n      freshly created directory will probably be the object of a future\n\n\n\n      CWD command.  Unfortunately, the argument to MKD may not always be\n      a suitable argument for CWD.  This is the case, for example, when\n      a TOPS-20 subdirectory is created by giving just the subdirectory\n      name.  That is, with a TOPS-20 server FTP, the command sequence\n\n         MKD MYDIR\n         CWD MYDIR\n\n      will fail.  The new directory may only be referred to by its\n      \"absolute\" name; e.g., if the MKD command above were issued while\n      connected to the directory <DFRANKLIN>, the new subdirectory\n      could only be referred to by the name <DFRANKLIN.MYDIR>.\n\n      Even on UNIX and Multics, however, the argument given to MKD may\n      not be suitable.  If it is a \"relative\" pathname (i.e., a pathname\n      which is interpreted relative to the current directory), the user\n      would need to be in the same current directory in order to reach\n      the subdirectory.  Depending on the application, this may be\n      inconvenient.  It is not very robust in any case.\n\n      To solve these problems, upon successful completion of an MKD\n      command, the server should return a line of the form:\n\n         257<space>\"<directory-name>\"<space><commentary>\n\n      That is, the server will tell the user what string to use when\n      referring to the created  directory.  The directory name can\n      contain any character; embedded double-quotes should be escaped by\n      double-quotes (the \"quote-doubling\" convention).\n\n      For example, a user connects to the directory /usr/dm, and creates\n      a subdirectory, named pathname:\n\n         CWD /usr/dm\n         200 directory changed to /usr/dm\n         MKD pathname\n         257 \"/usr/dm/pathname\" directory created\n\n      An example with an embedded double quote:\n\n         MKD foo\"bar\n         257 \"/usr/dm/foo\"\"bar\" directory created\n         CWD /usr/dm/foo\"bar\n         200 directory changed to /usr/dm/foo\"bar\n\n\n\n\n\n\n      The prior existence of a subdirectory with the same name is an\n      error, and the server must return an \"access denied\" error reply\n      in that case.\n\n         CWD /usr/dm\n         200 directory changed to /usr/dm\n         MKD pathname\n         521-\"/usr/dm/pathname\" directory already exists;\n         521 taking no action.\n\n      The failure replies for MKD are analogous to its file  creating\n      cousin, STOR.  Also, an \"access denied\" return is given if a file\n      name with the same name as the subdirectory will conflict with the\n      creation of the subdirectory (this is a problem on UNIX, but\n      shouldn't be one on TOPS-20).\n\n      Essentially because the PWD command returns the same type of\n      information as the successful MKD command, the successful PWD\n      command uses the 257 reply code as well.\n\n   SUBTLETIES\n\n      Because these commands will be most useful in transferring\n      subtrees from one machine to another, carefully observe that the\n      argument to MKD is to be interpreted as a sub-directory of  the\n      current working directory, unless it contains enough information\n      for the destination host to tell otherwise.  A hypothetical\n      example of its use in the TOPS-20 world:\n\n         CWD <some.where>\n         200 Working directory changed\n         MKD overrainbow\n         257 \"<some.where.overrainbow>\" directory created\n         CWD overrainbow\n         431 No such directory\n         CWD <some.where.overrainbow>\n         200 Working directory changed\n\n         CWD <some.where>\n         200 Working directory changed to <some.where>\n         MKD <unambiguous>\n         257 \"<unambiguous>\" directory created\n         CWD <unambiguous>\n\n      Note that the first example results in a subdirectory of the\n      connected directory.  In contrast, the argument in the second\n      example contains enough information for TOPS-20 to tell that  the\n\n\n\n      <unambiguous> directory is a top-level directory.  Note also that\n      in the first example the user \"violated\" the protocol by\n      attempting to access the freshly created directory with a name\n      other than the one returned by TOPS-20.  Problems could have\n      resulted in this case had there been an <overrainbow> directory;\n      this is an ambiguity inherent in some TOPS-20 implementations.\n      Similar considerations apply to the RMD command.  The point is\n      this: except where to do so would violate a host's conventions for\n      denoting relative versus absolute pathnames, the host should treat\n      the operands of the MKD and RMD commands as subdirectories.  The\n      257 reply to the MKD command must always contain the absolute\n      pathname of the created directory."
  },
  {
    "section_number": "APPENDIX III",
    "section_name": "RFCs on FTP",
    "tag": "Section APPENDIX III RFCs on FTP",
    "content": "\n   Bhushan, Abhay, \"A File Transfer Protocol\", RFC 114 (NIC 5823),\n   MIT-Project MAC, 16 April 1971.\n\n   Harslem, Eric, and John Heafner, \"Comments on RFC 114 (A File\n   Transfer Protocol)\", RFC 141 (NIC 6726), RAND, 29 April 1971.\n\n   Bhushan, Abhay, et al, \"The File Transfer Protocol\", RFC 172\n   (NIC 6794), MIT-Project MAC, 23 June 1971.\n\n   Braden, Bob, \"Comments on DTP and FTP Proposals\", RFC 238 (NIC 7663),\n   UCLA/CCN, 29 September 1971.\n\n   Bhushan, Abhay, et al, \"The File Transfer Protocol\", RFC 265\n   (NIC 7813), MIT-Project MAC, 17 November 1971.\n\n   McKenzie, Alex, \"A Suggested Addition to File Transfer Protocol\",\n   RFC 281 (NIC 8163), BBN, 8 December 1971.\n\n   Bhushan, Abhay, \"The Use of \"Set Data Type\" Transaction in File\n   Transfer Protocol\", RFC 294 (NIC 8304), MIT-Project MAC,\n   25 January 1972.\n\n   Bhushan, Abhay, \"The File Transfer Protocol\", RFC 354 (NIC 10596),\n   MIT-Project MAC, 8 July 1972.\n\n   Bhushan, Abhay, \"Comments on the File Transfer Protocol (RFC 354)\",\n   RFC 385 (NIC 11357), MIT-Project MAC, 18 August 1972.\n\n   Hicks, Greg, \"User FTP Documentation\", RFC 412 (NIC 12404), Utah,\n   27 November 1972.\n\n   Bhushan, Abhay, \"File Transfer Protocol (FTP) Status and Further\n   Comments\", RFC 414 (NIC 12406), MIT-Project MAC, 20 November 1972.\n\n   Braden, Bob, \"Comments on File Transfer Protocol\", RFC 430\n   (NIC 13299), UCLA/CCN, 7 February 1973.\n\n   Thomas, Bob, and Bob Clements, \"FTP Server-Server Interaction\",\n   RFC 438 (NIC 13770), BBN, 15 January 1973.\n\n   Braden, Bob, \"Print Files in FTP\", RFC 448 (NIC 13299), UCLA/CCN,\n   27 February 1973.\n\n   McKenzie, Alex, \"File Transfer Protocol\", RFC 454 (NIC 14333), BBN,\n   16 February 1973.\n\n\n\n   Bressler, Bob, and Bob Thomas, \"Mail Retrieval via FTP\", RFC 458\n   (NIC 14378), BBN-NET and BBN-TENEX, 20 February 1973.\n\n   Neigus, Nancy, \"File Transfer Protocol\", RFC 542 (NIC 17759), BBN,\n   12 July 1973.\n\n   Krilanovich, Mark, and George Gregg, \"Comments on the File Transfer\n   Protocol\", RFC 607 (NIC 21255), UCSB, 7 January 1974.\n\n   Pogran, Ken, and Nancy Neigus, \"Response to RFC 607 - Comments on the\n   File Transfer Protocol\", RFC 614 (NIC 21530), BBN, 28 January 1974.\n\n   Krilanovich, Mark, George Gregg, Wayne Hathaway, and Jim White,\n   \"Comments on the File Transfer Protocol\", RFC 624 (NIC 22054), UCSB,\n   Ames Research Center, SRI-ARC, 28 February 1974.\n\n   Bhushan, Abhay, \"FTP Comments and Response to RFC 430\", RFC 463\n   (NIC 14573), MIT-DMCG, 21 February 1973.\n\n   Braden, Bob, \"FTP Data Compression\", RFC 468 (NIC 14742), UCLA/CCN,\n   8 March 1973.\n\n   Bhushan, Abhay, \"FTP and Network Mail System\", RFC 475 (NIC 14919),\n   MIT-DMCG, 6 March 1973.\n\n   Bressler, Bob, and Bob Thomas \"FTP Server-Server Interaction - II\",\n   RFC 478 (NIC 14947), BBN-NET and BBN-TENEX, 26 March 1973.\n\n   White, Jim, \"Use of FTP by the NIC Journal\", RFC 479 (NIC 14948),\n   SRI-ARC, 8 March 1973.\n\n   White, Jim, \"Host-Dependent FTP Parameters\", RFC 480 (NIC 14949),\n   SRI-ARC, 8 March 1973.\n\n   Padlipsky, Mike, \"An FTP Command-Naming Problem\", RFC 506\n   (NIC 16157), MIT-Multics, 26 June 1973.\n\n   Day, John, \"Memo to FTP Group (Proposal for File Access Protocol)\",\n   RFC 520 (NIC 16819), Illinois, 25 June 1973.\n\n   Merryman, Robert, \"The UCSD-CC Server-FTP Facility\", RFC 532\n   (NIC 17451), UCSD-CC, 22 June 1973.\n\n   Braden, Bob, \"TENEX FTP Problem\", RFC 571 (NIC 18974), UCLA/CCN,\n   15 November 1973.\n\n\n\n\n\n   McKenzie, Alex, and Jon Postel, \"Telnet and FTP Implementation -\n   Schedule Change\", RFC 593 (NIC 20615), BBN and MITRE,\n   29 November 1973.\n\n   Sussman, Julie, \"FTP Error Code Usage for More Reliable Mail\n   Service\", RFC 630 (NIC 30237), BBN, 10 April 1974.\n\n   Postel, Jon, \"Revised FTP Reply Codes\", RFC 640 (NIC 30843),\n   UCLA/NMC, 5 June 1974.\n\n   Harvey, Brian, \"Leaving Well Enough Alone\", RFC 686 (NIC 32481),\n   SU-AI, 10 May 1975.\n\n   Harvey, Brian, \"One More Try on the FTP\", RFC 691 (NIC 32700), SU-AI,\n   28 May 1975.\n\n   Lieb, J., \"CWD Command of FTP\", RFC 697 (NIC 32963), 14 July 1975.\n\n   Harrenstien, Ken, \"FTP Extension: XSEN\", RFC 737 (NIC 42217), SRI-KL,\n   31 October 1977.\n\n   Harrenstien, Ken, \"FTP Extension: XRSQ/XRCP\", RFC 743 (NIC 42758),\n   SRI-KL, 30 December 1977.\n\n   Lebling, P. David, \"Survey of FTP Mail and MLFL\", RFC 751, MIT,\n   10 December 1978.\n\n   Postel, Jon, \"File Transfer Protocol Specification\", RFC 765, ISI,\n   June 1980.\n\n   Mankins, David, Dan Franklin, and Buzz Owen, \"Directory Oriented FTP\n   Commands\", RFC 776, BBN, December 1980.\n\n   Padlipsky, Michael, \"FTP Unique-Named Store Command\", RFC 949, MITRE,\n   July 1985.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nREFERENCES\n\n   [1]  Feinler, Elizabeth, \"Internet Protocol Transition Workbook\",\n        Network Information Center, SRI International, March 1982.\n\n   [2]  Postel, Jon, \"Transmission Control Protocol - DARPA Internet\n        Program Protocol Specification\", RFC 793, DARPA, September 1981.\n\n   [3]  Postel, Jon, and Joyce Reynolds, \"Telnet Protocol\n        Specification\", RFC 854, ISI, May 1983.\n\n   [4]  Reynolds, Joyce, and Jon Postel, \"Assigned Numbers\", RFC 943,\n        ISI, April 1985."
  }
]