Skip to main content

Specifications

1. Data Transfer​

FTP uses the data transfer protocol described in RFC 171, for transferring data and/or control transaction. Both data and control transactions are communicated over the same connection.

2. Data Transactions​

Data transactions represent the data contained in a file. There is no data type or byte size information contained in data transactions. The structure of data is instead communicated via control transactions. A file may be transferred as one or more data transactions. The protocol neither specifies nor imposes any limitations on the structure (record, group, etc) or length of file. Such limitations may however be imposed by a serving host. The end of a file may be indicated either by a file separator (as defined in data transfer protocol), or by closing connection (in type B0). In particular a serving or using host should not send the ETX, or other end of file character, unless such a character is part of the data in file (i.e., not provided by system).

3. Control Transactions​

The control transactions may be typified as requests, identifiers, and terminates. A request fulfillment sequence begins with a request and ends with receipt of data (followed by End-of-File) or a terminate.

3A. Op Codes​

Control transactions are distinguished by their first byte referred as op code. A standard set of opcodes is defined below. Implementation of a workable[4] subset of opcodes is specifically permitted. Additional standard opcodes may be assigned later. Opcodes hex 5A (octal 100) through hex FF (octal 377) are for experimental use.

   Op Code                   Operation
Hex Octal

00 000 Change data type identifier

01 001 Retrieve Request

02 002 Store request (replaced if file already
exists)

03 003 Delete request

04 004 Rename_from request

05 005 Rename_to request

06 006 List_file_directory request

07 007 Username identifier

08 010 Password identifier

09 011 Error or unsuccessful terminate

04 012 Acknowledge or successful terminate

0B 013 Append request (add to existing file)

0C 014

through through Reserved for standard assignment

4F 077

5A 100

through through Reserved for experimental use

FF 377