In this document means RFC 294 in January that the current paragraph 1982. should end. FTP has had a long RFC 354 obsoleted evolution over the years. RFCs 264 and 265. Appendix III is a The File Transfer chronological compilation of Protocol was now Request for Comments documents defined as a relating to FTP. These include protocol for file the first proposed file transfer between transfer mechanisms in 1971 HOSTs on the that were developed for ARPANET, with the implementation on hosts at primary function of M.I.T. (RFC FTP defined as 114), plus comments and transfering files discussion in RFC 141. What is efficiently and important is that reliably among hosts oneLONGWORDTHAT remote file storage WILLNOTFITINTOANYLINEOFANYWIDT capabilities. RFC HONECANIMAGINE or if such a 385 further word is concatenated with commented on errors, another one that should be in emphasis points, and second paragraph additions to the ASISTHISWORDTHATWILLBETOOLONGT protocol, while RFC OFITANYLINEAGAIN 414 provided a ANDTHEOTHERONETHATISSOLONGTHAT status report on the ANYPROGRAMPROCESSINGITMIGHTHAV working server and EPROBLEMSBUTWEHOPETHATTHEYWILL user FTPs. RFC 430, NOT have any problems. issued in 1973, RFC 172 provided a user-level (among other RFCs oriented protocol for file too numerous to transfer between host mention) presented computers (including terminal further comments on IMPs). A revision of this as FTP. Finally, an RFC 265, restated FTP for "official" FTP additional review, while RFC document was 281 suggested further changes. published as RFC The use of a "Set Data Type" 454. transaction was proposed in By July 1973, -------------- considerable changes from the control connection. last versions of FTP were The control made, but the general connection follows structure remained the same. the Telnet protocol. RFC 542 was published as a new At the initiation of "official" specification to the user, standard reflect these changes. FTP commands are However, many implementations generated by the based on the older user-PI and specification were not transmitted to the updated. In 1974, RFCs 607 and server process via 614 continued comments on FTP. the control RFC 624 proposed further connection. (The design changes and minor user may establish a modifications. In 1975, RFC direct control 686 entitled, "Leaving Well connection to the Enough Alone", discussed the server-FTP, from a differences between all of the TAC terminal for early and later versions of example, and FTP. RFC 691 presented a minor generate standard revision of RFC 686, regarding FTP commands the subject of print files. independently, Motivated by the transition bypassing the from the NCP to the TCP as the user-FTP process.) underlying protocol, a phoenix Standard replies are was born out of all of the sent from the above efforts in RFC 765 as server-PI to the the specification of FTP for user-PI over the use on TCP. control connection This current edition of the in response to the FTP specification is intended commands. to correct some minor The FTP commands documentation errors, to specify the improve the explanation of parameters for the some protocol features, and to data connection add some new optional (data port, transfer commands. mode, representation In the model described in type, and structure) Figure 1, the user-protocol and the nature of interpreter initiates the file system -------------- operation (store, retrieve, which describe the append, delete, etc.). The functions to be user-DTP or its designate performed, and the should "listen" on the replies to these specified data port, and the commands (see the server initiate the data Section on FTP connection and data transfer Replies). Several in accordance with the commands are specified parameters. It concerned with the should be noted that the data transfer of data port need not be in the same between hosts. These host that initiates the FTP data transfer commands via the control commands include the connection, but the user or MODE command which the user-FTP process must specify how the bits ensure a "listen" on the of the data are to specified data port. It ought be transmitted, and to also be noted that the data the STRUcture and connection may be used for TYPE commands, which simultaneous sending and are used to define receiving. the way in which the In another situation a user data are to be might wish to transfer files represented. The between two hosts, neither of transmission and which is a local host. The representation are user sets up control basically connections to the two servers independent but the and then arranges for a data "Stream" connection between them. In transmission mode is this manner, control dependent on the information is passed to the file structure user-PI but data is attribute and if transferred between the server "Compressed" data transfer processes. transmission mode is Following is a model of this used, the nature of server-server interaction. the filler byte Files are transferred only via depends on the the data connection. The representation type. control connection is used for 3.1. DATA the transfer of commands, REPRESENTATION AND -------------- STORAGE send data, and the Data is transferred from a receiver store it. storage device in the sending For example, when host to a storage device in transmitting 32-bit the receiving host. Often it bytes from a 32-bit is necessary to perform word-length system certain transformations on the to a 36-bit data because data storage word-length system, representations in the two it may be desirable systems are different. For (for reasons of example, NVT-ASCII has efficiency and different data storage usefulness) to store representations in different the 32-bit bytes systems. DEC TOPS-20s's right-justified in a generally store NVT-ASCII as 36-bit word in the five 7-bit ASCII characters, latter system. In left-justified in a 36-bit any case, the user word. IBM Mainframe's store should have the NVT-ASCII as 8-bit EBCDIC option of specifying codes. Multics stores data representation NVT-ASCII as four 9-bit and transformation characters in a 36-bit word. functions. It should It is desirable to convert be noted that FTP characters into the standard provides for very NVT-ASCII representation when limited data type transmitting text between representations. dissimilar systems. The Transformations sending and receiving sites desired beyond this would have to perform the limited capability necessary transformations should be performed between the standard by the user representation and their directly. internal representations. 3.1.1. DATA TYPES A different problem in Data representations representation arises when are handled in FTP transmitting binary data (not by a user specifying character codes) between host a representation systems with different word type. This type may lengths. It is not always implicitly (as in clear how the sender should ASCII or EBCDIC) or -------------- explicitly (as in Local byte) text. (See the define a byte size for discussion of file interpretation which is structure at the end referred to as the "logical of the Section on byte size." Note that this has Data Representation nothing to do with the byte and Storage.) size used for transmission 3.1.1.2. EBCDIC TYPE over the data connection, This type is called the "transfer byte intended for size", and the two should not efficient transfer be confused. For example, between hosts which NVT-ASCII has a logical byte use EBCDIC for their size of 8 bits. If the type is internal character Local byte, then the TYPE representation. command has an obligatory For transmission, second parameter specifying the data are the logical byte size. The represented as 8-bit transfer byte size is always 8 EBCDIC characters. bits. The character code 3.1.1.1. ASCII TYPE is the only This is the default type and difference between must be accepted by all FTP the functional implementations. It is specifications of intended primarily for the EBCDIC and ASCII transfer of text files, except types. when both hosts would find the End-of-line (as EBCDIC type more convenient. opposed to The sender converts the data end-of-record--see from an internal character the discussion of representation to the standard structure) will 8-bit NVT-ASCII representation probably be rarely (see the Telnet used with EBCDIC specification). The receiver type for purposes of will convert the data from the denoting structure, standard form to his own but where it is internal form. necessary the In accordance with the NVT character should be standard, the sequence used. should be used where necessary 3.1.1.3. IMAGE TYPE to denote the end of a line of The data are sent as -------------- contiguous bits which, for the same as the transfer, are packed into the transfer byte size. 8-bit transfer bytes. The If there is a receiving site must store the difference in byte data as contiguous bits. The sizes, then the structure of the storage logical bytes should system might necessitate the be packed padding of the file (or of contiguously, each record, for a disregarding record-structured file) to transfer byte some convenient boundary boundaries and with (byte, word or block). This any necessary padding, which must be all padding at the end. zeros, may occur only at the When the data end of the file (or at the end reaches the of each record) and there must receiving host, it be a way of identifying the will be transformed padding bits so that they may in a manner be stripped off if the file is dependent on the retrieved. The padding logical byte size transformation should be well and the particular publicized to enable a user to host. This process a file at the storage transformation must site. be invertible (i.e., Image type is intended for the an identical file efficient storage and can be retrieved if retrieval of files and for the the same parameters transfer of binary data. It is are used) and should recommended that this type be be well publicized accepted by all FTP by the FTP implementations. implementors. 3.1.1.4. LOCAL TYPE For example, a user The data is transferred in sending 36-bit logical bytes of the size floating-point specified by the obligatory numbers to a host second parameter, Byte size. with a 32-bit word The value of Byte size must be could send that data a decimal integer; there is no as Local byte with a default value. The logical logical byte size of byte size is not necessarily 36. The receiving -------------- host would then be expected to to another and store the logical bytes so process the file at that they could be easily the second host manipulated; in this example without undue putting the 36-bit logical trouble. A single bytes into 64-bit double words ASCII or EBCDIC should suffice. format does not In another example, a pair of satisfy all these hosts with a 36-bit word size conditions. may send data to one another Therefore, these in words by using TYPE L 36. types have a second The data would be sent in the parameter specifying 8-bit transmission bytes one of the following packed so that 9 transmission three formats: bytes carried two host words. 3.1.1.5.1. NON PRINT 3.1.1.5. FORMAT CONTROL This is the default The types ASCII and EBCDIC format to be used if also take a second (optional) the second (format) parameter; this is to indicate parameter is what kind of vertical format omitted. Non-print control, if any, is associated format must be with a file. The following accepted by all FTP data representation types are implementations. The defined in FTP: file need contain no A character file may be vertical format transferred to a host for one information. If it of three purposes: for is passed to a printing, for storage and printer process, later retrieval, or for this process may processing. If a file is sent assume standard for printing, the receiving values for spacing host must know how the and margins. vertical format control is Normally, this represented. In the second format will be used case, it must be possible to with files destined store a file at a host and for processing or then retrieve it later in just storage. exactly the same form. 3.1.1.5.2. TELNET Finally, it should be possible FORMAT CONTROLS to move a file from one host The file contains -------------- ASCII/EBCDIC vertical format controls (i.e., ,,,,) which the printer process will interpret appropriately. , in exactly this sequence.