annotate docs/rfcs/rfc959.txt @ 986:aa26efad4834

Updated Telugu Translation
author kkrothap
date Fri, 20 Mar 2009 09:25:07 +0000
parents e60a6ec4aa85
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
497
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3 Network Working Group J. Postel
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4 Request for Comments: 959 J. Reynolds
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
5 ISI
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
6 Obsoletes RFC: 765 (IEN 149) October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
7
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
8 FILE TRANSFER PROTOCOL (FTP)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
9
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
10
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
11 Status of this Memo
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
12
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
13 This memo is the official specification of the File Transfer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
14 Protocol (FTP). Distribution of this memo is unlimited.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
15
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
16 The following new optional commands are included in this edition of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
17 the specification:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
18
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
19 CDUP (Change to Parent Directory), SMNT (Structure Mount), STOU
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
20 (Store Unique), RMD (Remove Directory), MKD (Make Directory), PWD
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
21 (Print Directory), and SYST (System).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
22
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
23 Note that this specification is compatible with the previous edition.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
24
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
25 1. INTRODUCTION
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
26
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
27 The objectives of FTP are 1) to promote sharing of files (computer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
28 programs and/or data), 2) to encourage indirect or implicit (via
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
29 programs) use of remote computers, 3) to shield a user from
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
30 variations in file storage systems among hosts, and 4) to transfer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
31 data reliably and efficiently. FTP, though usable directly by a user
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
32 at a terminal, is designed mainly for use by programs.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
33
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
34 The attempt in this specification is to satisfy the diverse needs of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
35 users of maxi-hosts, mini-hosts, personal workstations, and TACs,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
36 with a simple, and easily implemented protocol design.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
37
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
38 This paper assumes knowledge of the Transmission Control Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
39 (TCP) [2] and the Telnet Protocol [3]. These documents are contained
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
40 in the ARPA-Internet protocol handbook [1].
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
41
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
42 2. OVERVIEW
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
43
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
44 In this section, the history, the terminology, and the FTP model are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
45 discussed. The terms defined in this section are only those that
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
46 have special significance in FTP. Some of the terminology is very
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
47 specific to the FTP model; some readers may wish to turn to the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
48 section on the FTP model while reviewing the terminology.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
49
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
50
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
51
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
52
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
53
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
54
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
55
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
56 Postel & Reynolds [Page 1]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
57
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
58
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
59
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
60 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
61 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
62
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
63
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
64 2.1. HISTORY
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
65
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
66 FTP has had a long evolution over the years. Appendix III is a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
67 chronological compilation of Request for Comments documents
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
68 relating to FTP. These include the first proposed file transfer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
69 mechanisms in 1971 that were developed for implementation on hosts
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
70 at M.I.T. (RFC 114), plus comments and discussion in RFC 141.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
71
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
72 RFC 172 provided a user-level oriented protocol for file transfer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
73 between host computers (including terminal IMPs). A revision of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
74 this as RFC 265, restated FTP for additional review, while RFC 281
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
75 suggested further changes. The use of a "Set Data Type"
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
76 transaction was proposed in RFC 294 in January 1982.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
77
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
78 RFC 354 obsoleted RFCs 264 and 265. The File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
79 was now defined as a protocol for file transfer between HOSTs on
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
80 the ARPANET, with the primary function of FTP defined as
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
81 transfering files efficiently and reliably among hosts and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
82 allowing the convenient use of remote file storage capabilities.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
83 RFC 385 further commented on errors, emphasis points, and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
84 additions to the protocol, while RFC 414 provided a status report
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
85 on the working server and user FTPs. RFC 430, issued in 1973,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
86 (among other RFCs too numerous to mention) presented further
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
87 comments on FTP. Finally, an "official" FTP document was
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
88 published as RFC 454.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
89
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
90 By July 1973, considerable changes from the last versions of FTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
91 were made, but the general structure remained the same. RFC 542
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
92 was published as a new "official" specification to reflect these
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
93 changes. However, many implementations based on the older
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
94 specification were not updated.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
95
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
96 In 1974, RFCs 607 and 614 continued comments on FTP. RFC 624
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
97 proposed further design changes and minor modifications. In 1975,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
98 RFC 686 entitled, "Leaving Well Enough Alone", discussed the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
99 differences between all of the early and later versions of FTP.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
100 RFC 691 presented a minor revision of RFC 686, regarding the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
101 subject of print files.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
102
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
103 Motivated by the transition from the NCP to the TCP as the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
104 underlying protocol, a phoenix was born out of all of the above
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
105 efforts in RFC 765 as the specification of FTP for use on TCP.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
106
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
107 This current edition of the FTP specification is intended to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
108 correct some minor documentation errors, to improve the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
109 explanation of some protocol features, and to add some new
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
110 optional commands.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
111
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
112
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
113 Postel & Reynolds [Page 2]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
114
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
115
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
116
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
117 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
118 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
119
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
120
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
121 In particular, the following new optional commands are included in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
122 this edition of the specification:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
123
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
124 CDUP - Change to Parent Directory
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
125
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
126 SMNT - Structure Mount
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
127
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
128 STOU - Store Unique
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
129
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
130 RMD - Remove Directory
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
131
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
132 MKD - Make Directory
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
133
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
134 PWD - Print Directory
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
135
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
136 SYST - System
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
137
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
138 This specification is compatible with the previous edition. A
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
139 program implemented in conformance to the previous specification
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
140 should automatically be in conformance to this specification.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
141
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
142 2.2. TERMINOLOGY
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
143
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
144 ASCII
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
145
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
146 The ASCII character set is as defined in the ARPA-Internet
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
147 Protocol Handbook. In FTP, ASCII characters are defined to be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
148 the lower half of an eight-bit code set (i.e., the most
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
149 significant bit is zero).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
150
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
151 access controls
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
152
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
153 Access controls define users' access privileges to the use of a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
154 system, and to the files in that system. Access controls are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
155 necessary to prevent unauthorized or accidental use of files.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
156 It is the prerogative of a server-FTP process to invoke access
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
157 controls.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
158
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
159 byte size
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
160
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
161 There are two byte sizes of interest in FTP: the logical byte
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
162 size of the file, and the transfer byte size used for the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
163 transmission of the data. The transfer byte size is always 8
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
164 bits. The transfer byte size is not necessarily the byte size
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
165 in which data is to be stored in a system, nor the logical byte
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
166 size for interpretation of the structure of the data.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
167
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
168
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
169
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
170 Postel & Reynolds [Page 3]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
171
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
172
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
173
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
174 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
175 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
176
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
177
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
178 control connection
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
179
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
180 The communication path between the USER-PI and SERVER-PI for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
181 the exchange of commands and replies. This connection follows
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
182 the Telnet Protocol.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
183
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
184 data connection
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
185
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
186 A full duplex connection over which data is transferred, in a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
187 specified mode and type. The data transferred may be a part of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
188 a file, an entire file or a number of files. The path may be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
189 between a server-DTP and a user-DTP, or between two
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
190 server-DTPs.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
191
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
192 data port
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
193
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
194 The passive data transfer process "listens" on the data port
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
195 for a connection from the active transfer process in order to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
196 open the data connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
197
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
198 DTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
199
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
200 The data transfer process establishes and manages the data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
201 connection. The DTP can be passive or active.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
202
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
203 End-of-Line
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
204
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
205 The end-of-line sequence defines the separation of printing
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
206 lines. The sequence is Carriage Return, followed by Line Feed.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
207
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
208 EOF
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
209
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
210 The end-of-file condition that defines the end of a file being
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
211 transferred.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
212
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
213 EOR
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
214
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
215 The end-of-record condition that defines the end of a record
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
216 being transferred.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
217
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
218 error recovery
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
219
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
220 A procedure that allows a user to recover from certain errors
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
221 such as failure of either host system or transfer process. In
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
222 FTP, error recovery may involve restarting a file transfer at a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
223 given checkpoint.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
224
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
225
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
226
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
227 Postel & Reynolds [Page 4]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
228
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
229
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
230
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
231 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
232 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
233
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
234
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
235 FTP commands
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
236
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
237 A set of commands that comprise the control information flowing
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
238 from the user-FTP to the server-FTP process.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
239
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
240 file
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
241
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
242 An ordered set of computer data (including programs), of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
243 arbitrary length, uniquely identified by a pathname.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
244
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
245 mode
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
246
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
247 The mode in which data is to be transferred via the data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
248 connection. The mode defines the data format during transfer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
249 including EOR and EOF. The transfer modes defined in FTP are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
250 described in the Section on Transmission Modes.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
251
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
252 NVT
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
253
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
254 The Network Virtual Terminal as defined in the Telnet Protocol.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
255
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
256 NVFS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
257
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
258 The Network Virtual File System. A concept which defines a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
259 standard network file system with standard commands and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
260 pathname conventions.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
261
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
262 page
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
263
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
264 A file may be structured as a set of independent parts called
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
265 pages. FTP supports the transmission of discontinuous files as
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
266 independent indexed pages.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
267
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
268 pathname
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
269
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
270 Pathname is defined to be the character string which must be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
271 input to a file system by a user in order to identify a file.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
272 Pathname normally contains device and/or directory names, and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
273 file name specification. FTP does not yet specify a standard
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
274 pathname convention. Each user must follow the file naming
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
275 conventions of the file systems involved in the transfer.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
276
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
277 PI
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
278
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
279 The protocol interpreter. The user and server sides of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
280 protocol have distinct roles implemented in a user-PI and a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
281 server-PI.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
282
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
283
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
284 Postel & Reynolds [Page 5]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
285
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
286
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
287
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
288 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
289 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
290
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
291
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
292 record
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
293
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
294 A sequential file may be structured as a number of contiguous
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
295 parts called records. Record structures are supported by FTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
296 but a file need not have record structure.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
297
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
298 reply
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
299
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
300 A reply is an acknowledgment (positive or negative) sent from
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
301 server to user via the control connection in response to FTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
302 commands. The general form of a reply is a completion code
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
303 (including error codes) followed by a text string. The codes
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
304 are for use by programs and the text is usually intended for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
305 human users.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
306
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
307 server-DTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
308
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
309 The data transfer process, in its normal "active" state,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
310 establishes the data connection with the "listening" data port.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
311 It sets up parameters for transfer and storage, and transfers
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
312 data on command from its PI. The DTP can be placed in a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
313 "passive" state to listen for, rather than initiate a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
314 connection on the data port.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
315
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
316 server-FTP process
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
317
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
318 A process or set of processes which perform the function of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
319 file transfer in cooperation with a user-FTP process and,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
320 possibly, another server. The functions consist of a protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
321 interpreter (PI) and a data transfer process (DTP).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
322
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
323 server-PI
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
324
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
325 The server protocol interpreter "listens" on Port L for a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
326 connection from a user-PI and establishes a control
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
327 communication connection. It receives standard FTP commands
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
328 from the user-PI, sends replies, and governs the server-DTP.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
329
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
330 type
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
331
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
332 The data representation type used for data transfer and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
333 storage. Type implies certain transformations between the time
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
334 of data storage and data transfer. The representation types
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
335 defined in FTP are described in the Section on Establishing
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
336 Data Connections.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
337
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
338
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
339
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
340
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
341 Postel & Reynolds [Page 6]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
342
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
343
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
344
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
345 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
346 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
347
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
348
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
349 user
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
350
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
351 A person or a process on behalf of a person wishing to obtain
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
352 file transfer service. The human user may interact directly
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
353 with a server-FTP process, but use of a user-FTP process is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
354 preferred since the protocol design is weighted towards
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
355 automata.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
356
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
357 user-DTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
358
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
359 The data transfer process "listens" on the data port for a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
360 connection from a server-FTP process. If two servers are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
361 transferring data between them, the user-DTP is inactive.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
362
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
363 user-FTP process
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
364
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
365 A set of functions including a protocol interpreter, a data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
366 transfer process and a user interface which together perform
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
367 the function of file transfer in cooperation with one or more
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
368 server-FTP processes. The user interface allows a local
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
369 language to be used in the command-reply dialogue with the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
370 user.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
371
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
372 user-PI
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
373
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
374 The user protocol interpreter initiates the control connection
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
375 from its port U to the server-FTP process, initiates FTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
376 commands, and governs the user-DTP if that process is part of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
377 the file transfer.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
378
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
379
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
380
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
381
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
382
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
383
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
384
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
385
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
386
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
387
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
388
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
389
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
390
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
391
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
392
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
393
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
394
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
395
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
396
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
397
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
398 Postel & Reynolds [Page 7]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
399
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
400
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
401
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
402 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
403 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
404
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
405
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
406 2.3. THE FTP MODEL
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
407
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
408 With the above definitions in mind, the following model (shown in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
409 Figure 1) may be diagrammed for an FTP service.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
410
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
411 -------------
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
412 |/---------\|
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
413 || User || --------
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
414 ||Interface|<--->| User |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
415 |\----^----/| --------
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
416 ---------- | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
417 |/------\| FTP Commands |/----V----\|
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
418 ||Server|<---------------->| User ||
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
419 || PI || FTP Replies || PI ||
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
420 |\--^---/| |\----^----/|
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
421 | | | | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
422 -------- |/--V---\| Data |/----V----\| --------
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
423 | File |<--->|Server|<---------------->| User |<--->| File |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
424 |System| || DTP || Connection || DTP || |System|
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
425 -------- |\------/| |\---------/| --------
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
426 ---------- -------------
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
427
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
428 Server-FTP USER-FTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
429
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
430 NOTES: 1. The data connection may be used in either direction.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
431 2. The data connection need not exist all of the time.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
432
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
433 Figure 1 Model for FTP Use
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
434
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
435 In the model described in Figure 1, the user-protocol interpreter
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
436 initiates the control connection. The control connection follows
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
437 the Telnet protocol. At the initiation of the user, standard FTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
438 commands are generated by the user-PI and transmitted to the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
439 server process via the control connection. (The user may
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
440 establish a direct control connection to the server-FTP, from a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
441 TAC terminal for example, and generate standard FTP commands
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
442 independently, bypassing the user-FTP process.) Standard replies
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
443 are sent from the server-PI to the user-PI over the control
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
444 connection in response to the commands.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
445
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
446 The FTP commands specify the parameters for the data connection
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
447 (data port, transfer mode, representation type, and structure) and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
448 the nature of file system operation (store, retrieve, append,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
449 delete, etc.). The user-DTP or its designate should "listen" on
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
450 the specified data port, and the server initiate the data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
451 connection and data transfer in accordance with the specified
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
452 parameters. It should be noted that the data port need not be in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
453
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
454
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
455 Postel & Reynolds [Page 8]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
456
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
457
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
458
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
459 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
460 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
461
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
462
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
463 the same host that initiates the FTP commands via the control
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
464 connection, but the user or the user-FTP process must ensure a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
465 "listen" on the specified data port. It ought to also be noted
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
466 that the data connection may be used for simultaneous sending and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
467 receiving.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
468
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
469 In another situation a user might wish to transfer files between
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
470 two hosts, neither of which is a local host. The user sets up
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
471 control connections to the two servers and then arranges for a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
472 data connection between them. In this manner, control information
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
473 is passed to the user-PI but data is transferred between the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
474 server data transfer processes. Following is a model of this
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
475 server-server interaction.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
476
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
477
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
478 Control ------------ Control
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
479 ---------->| User-FTP |<-----------
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
480 | | User-PI | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
481 | | "C" | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
482 V ------------ V
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
483 -------------- --------------
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
484 | Server-FTP | Data Connection | Server-FTP |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
485 | "A" |<---------------------->| "B" |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
486 -------------- Port (A) Port (B) --------------
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
487
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
488
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
489 Figure 2
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
490
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
491 The protocol requires that the control connections be open while
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
492 data transfer is in progress. It is the responsibility of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
493 user to request the closing of the control connections when
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
494 finished using the FTP service, while it is the server who takes
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
495 the action. The server may abort data transfer if the control
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
496 connections are closed without command.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
497
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
498 The Relationship between FTP and Telnet:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
499
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
500 The FTP uses the Telnet protocol on the control connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
501 This can be achieved in two ways: first, the user-PI or the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
502 server-PI may implement the rules of the Telnet Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
503 directly in their own procedures; or, second, the user-PI or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
504 the server-PI may make use of the existing Telnet module in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
505 system.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
506
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
507 Ease of implementaion, sharing code, and modular programming
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
508 argue for the second approach. Efficiency and independence
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
509
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
510
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
511
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
512 Postel & Reynolds [Page 9]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
513
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
514
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
515
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
516 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
517 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
518
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
519
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
520 argue for the first approach. In practice, FTP relies on very
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
521 little of the Telnet Protocol, so the first approach does not
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
522 necessarily involve a large amount of code.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
523
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
524 3. DATA TRANSFER FUNCTIONS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
525
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
526 Files are transferred only via the data connection. The control
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
527 connection is used for the transfer of commands, which describe the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
528 functions to be performed, and the replies to these commands (see the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
529 Section on FTP Replies). Several commands are concerned with the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
530 transfer of data between hosts. These data transfer commands include
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
531 the MODE command which specify how the bits of the data are to be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
532 transmitted, and the STRUcture and TYPE commands, which are used to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
533 define the way in which the data are to be represented. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
534 transmission and representation are basically independent but the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
535 "Stream" transmission mode is dependent on the file structure
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
536 attribute and if "Compressed" transmission mode is used, the nature
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
537 of the filler byte depends on the representation type.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
538
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
539 3.1. DATA REPRESENTATION AND STORAGE
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
540
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
541 Data is transferred from a storage device in the sending host to a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
542 storage device in the receiving host. Often it is necessary to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
543 perform certain transformations on the data because data storage
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
544 representations in the two systems are different. For example,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
545 NVT-ASCII has different data storage representations in different
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
546 systems. DEC TOPS-20s's generally store NVT-ASCII as five 7-bit
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
547 ASCII characters, left-justified in a 36-bit word. IBM Mainframe's
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
548 store NVT-ASCII as 8-bit EBCDIC codes. Multics stores NVT-ASCII
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
549 as four 9-bit characters in a 36-bit word. It is desirable to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
550 convert characters into the standard NVT-ASCII representation when
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
551 transmitting text between dissimilar systems. The sending and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
552 receiving sites would have to perform the necessary
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
553 transformations between the standard representation and their
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
554 internal representations.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
555
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
556 A different problem in representation arises when transmitting
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
557 binary data (not character codes) between host systems with
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
558 different word lengths. It is not always clear how the sender
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
559 should send data, and the receiver store it. For example, when
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
560 transmitting 32-bit bytes from a 32-bit word-length system to a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
561 36-bit word-length system, it may be desirable (for reasons of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
562 efficiency and usefulness) to store the 32-bit bytes
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
563 right-justified in a 36-bit word in the latter system. In any
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
564 case, the user should have the option of specifying data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
565 representation and transformation functions. It should be noted
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
566
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
567
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
568
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
569 Postel & Reynolds [Page 10]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
570
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
571
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
572
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
573 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
574 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
575
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
576
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
577 that FTP provides for very limited data type representations.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
578 Transformations desired beyond this limited capability should be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
579 performed by the user directly.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
580
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
581 3.1.1. DATA TYPES
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
582
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
583 Data representations are handled in FTP by a user specifying a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
584 representation type. This type may implicitly (as in ASCII or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
585 EBCDIC) or explicitly (as in Local byte) define a byte size for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
586 interpretation which is referred to as the "logical byte size."
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
587 Note that this has nothing to do with the byte size used for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
588 transmission over the data connection, called the "transfer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
589 byte size", and the two should not be confused. For example,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
590 NVT-ASCII has a logical byte size of 8 bits. If the type is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
591 Local byte, then the TYPE command has an obligatory second
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
592 parameter specifying the logical byte size. The transfer byte
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
593 size is always 8 bits.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
594
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
595 3.1.1.1. ASCII TYPE
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
596
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
597 This is the default type and must be accepted by all FTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
598 implementations. It is intended primarily for the transfer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
599 of text files, except when both hosts would find the EBCDIC
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
600 type more convenient.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
601
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
602 The sender converts the data from an internal character
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
603 representation to the standard 8-bit NVT-ASCII
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
604 representation (see the Telnet specification). The receiver
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
605 will convert the data from the standard form to his own
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
606 internal form.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
607
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
608 In accordance with the NVT standard, the <CRLF> sequence
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
609 should be used where necessary to denote the end of a line
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
610 of text. (See the discussion of file structure at the end
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
611 of the Section on Data Representation and Storage.)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
612
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
613 Using the standard NVT-ASCII representation means that data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
614 must be interpreted as 8-bit bytes.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
615
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
616 The Format parameter for ASCII and EBCDIC types is discussed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
617 below.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
618
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
619
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
620
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
621
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
622
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
623
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
624
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
625
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
626 Postel & Reynolds [Page 11]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
627
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
628
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
629
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
630 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
631 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
632
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
633
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
634 3.1.1.2. EBCDIC TYPE
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
635
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
636 This type is intended for efficient transfer between hosts
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
637 which use EBCDIC for their internal character
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
638 representation.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
639
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
640 For transmission, the data are represented as 8-bit EBCDIC
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
641 characters. The character code is the only difference
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
642 between the functional specifications of EBCDIC and ASCII
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
643 types.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
644
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
645 End-of-line (as opposed to end-of-record--see the discussion
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
646 of structure) will probably be rarely used with EBCDIC type
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
647 for purposes of denoting structure, but where it is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
648 necessary the <NL> character should be used.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
649
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
650 3.1.1.3. IMAGE TYPE
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
651
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
652 The data are sent as contiguous bits which, for transfer,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
653 are packed into the 8-bit transfer bytes. The receiving
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
654 site must store the data as contiguous bits. The structure
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
655 of the storage system might necessitate the padding of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
656 file (or of each record, for a record-structured file) to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
657 some convenient boundary (byte, word or block). This
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
658 padding, which must be all zeros, may occur only at the end
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
659 of the file (or at the end of each record) and there must be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
660 a way of identifying the padding bits so that they may be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
661 stripped off if the file is retrieved. The padding
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
662 transformation should be well publicized to enable a user to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
663 process a file at the storage site.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
664
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
665 Image type is intended for the efficient storage and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
666 retrieval of files and for the transfer of binary data. It
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
667 is recommended that this type be accepted by all FTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
668 implementations.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
669
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
670 3.1.1.4. LOCAL TYPE
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
671
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
672 The data is transferred in logical bytes of the size
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
673 specified by the obligatory second parameter, Byte size.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
674 The value of Byte size must be a decimal integer; there is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
675 no default value. The logical byte size is not necessarily
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
676 the same as the transfer byte size. If there is a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
677 difference in byte sizes, then the logical bytes should be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
678 packed contiguously, disregarding transfer byte boundaries
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
679 and with any necessary padding at the end.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
680
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
681
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
682
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
683 Postel & Reynolds [Page 12]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
684
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
685
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
686
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
687 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
688 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
689
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
690
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
691 When the data reaches the receiving host, it will be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
692 transformed in a manner dependent on the logical byte size
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
693 and the particular host. This transformation must be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
694 invertible (i.e., an identical file can be retrieved if the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
695 same parameters are used) and should be well publicized by
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
696 the FTP implementors.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
697
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
698 For example, a user sending 36-bit floating-point numbers to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
699 a host with a 32-bit word could send that data as Local byte
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
700 with a logical byte size of 36. The receiving host would
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
701 then be expected to store the logical bytes so that they
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
702 could be easily manipulated; in this example putting the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
703 36-bit logical bytes into 64-bit double words should
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
704 suffice.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
705
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
706 In another example, a pair of hosts with a 36-bit word size
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
707 may send data to one another in words by using TYPE L 36.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
708 The data would be sent in the 8-bit transmission bytes
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
709 packed so that 9 transmission bytes carried two host words.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
710
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
711 3.1.1.5. FORMAT CONTROL
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
712
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
713 The types ASCII and EBCDIC also take a second (optional)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
714 parameter; this is to indicate what kind of vertical format
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
715 control, if any, is associated with a file. The following
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
716 data representation types are defined in FTP:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
717
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
718 A character file may be transferred to a host for one of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
719 three purposes: for printing, for storage and later
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
720 retrieval, or for processing. If a file is sent for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
721 printing, the receiving host must know how the vertical
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
722 format control is represented. In the second case, it must
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
723 be possible to store a file at a host and then retrieve it
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
724 later in exactly the same form. Finally, it should be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
725 possible to move a file from one host to another and process
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
726 the file at the second host without undue trouble. A single
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
727 ASCII or EBCDIC format does not satisfy all these
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
728 conditions. Therefore, these types have a second parameter
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
729 specifying one of the following three formats:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
730
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
731 3.1.1.5.1. NON PRINT
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
732
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
733 This is the default format to be used if the second
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
734 (format) parameter is omitted. Non-print format must be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
735 accepted by all FTP implementations.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
736
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
737
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
738
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
739
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
740 Postel & Reynolds [Page 13]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
741
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
742
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
743
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
744 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
745 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
746
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
747
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
748 The file need contain no vertical format information. If
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
749 it is passed to a printer process, this process may
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
750 assume standard values for spacing and margins.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
751
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
752 Normally, this format will be used with files destined
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
753 for processing or just storage.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
754
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
755 3.1.1.5.2. TELNET FORMAT CONTROLS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
756
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
757 The file contains ASCII/EBCDIC vertical format controls
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
758 (i.e., <CR>, <LF>, <NL>, <VT>, <FF>) which the printer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
759 process will interpret appropriately. <CRLF>, in exactly
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
760 this sequence, also denotes end-of-line.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
761
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
762 3.1.1.5.2. CARRIAGE CONTROL (ASA)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
763
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
764 The file contains ASA (FORTRAN) vertical format control
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
765 characters. (See RFC 740 Appendix C; and Communications
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
766 of the ACM, Vol. 7, No. 10, p. 606, October 1964.) In a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
767 line or a record formatted according to the ASA Standard,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
768 the first character is not to be printed. Instead, it
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
769 should be used to determine the vertical movement of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
770 paper which should take place before the rest of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
771 record is printed.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
772
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
773 The ASA Standard specifies the following control
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
774 characters:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
775
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
776 Character Vertical Spacing
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
777
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
778 blank Move paper up one line
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
779 0 Move paper up two lines
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
780 1 Move paper to top of next page
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
781 + No movement, i.e., overprint
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
782
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
783 Clearly there must be some way for a printer process to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
784 distinguish the end of the structural entity. If a file
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
785 has record structure (see below) this is no problem;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
786 records will be explicitly marked during transfer and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
787 storage. If the file has no record structure, the <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
788 end-of-line sequence is used to separate printing lines,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
789 but these format effectors are overridden by the ASA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
790 controls.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
791
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
792
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
793
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
794
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
795
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
796
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
797 Postel & Reynolds [Page 14]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
798
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
799
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
800
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
801 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
802 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
803
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
804
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
805 3.1.2. DATA STRUCTURES
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
806
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
807 In addition to different representation types, FTP allows the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
808 structure of a file to be specified. Three file structures are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
809 defined in FTP:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
810
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
811 file-structure, where there is no internal structure and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
812 the file is considered to be a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
813 continuous sequence of data bytes,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
814
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
815 record-structure, where the file is made up of sequential
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
816 records,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
817
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
818 and page-structure, where the file is made up of independent
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
819 indexed pages.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
820
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
821 File-structure is the default to be assumed if the STRUcture
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
822 command has not been used but both file and record structures
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
823 must be accepted for "text" files (i.e., files with TYPE ASCII
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
824 or EBCDIC) by all FTP implementations. The structure of a file
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
825 will affect both the transfer mode of a file (see the Section
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
826 on Transmission Modes) and the interpretation and storage of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
827 the file.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
828
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
829 The "natural" structure of a file will depend on which host
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
830 stores the file. A source-code file will usually be stored on
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
831 an IBM Mainframe in fixed length records but on a DEC TOPS-20
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
832 as a stream of characters partitioned into lines, for example
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
833 by <CRLF>. If the transfer of files between such disparate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
834 sites is to be useful, there must be some way for one site to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
835 recognize the other's assumptions about the file.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
836
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
837 With some sites being naturally file-oriented and others
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
838 naturally record-oriented there may be problems if a file with
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
839 one structure is sent to a host oriented to the other. If a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
840 text file is sent with record-structure to a host which is file
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
841 oriented, then that host should apply an internal
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
842 transformation to the file based on the record structure.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
843 Obviously, this transformation should be useful, but it must
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
844 also be invertible so that an identical file may be retrieved
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
845 using record structure.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
846
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
847 In the case of a file being sent with file-structure to a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
848 record-oriented host, there exists the question of what
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
849 criteria the host should use to divide the file into records
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
850 which can be processed locally. If this division is necessary,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
851 the FTP implementation should use the end-of-line sequence,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
852
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
853
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
854 Postel & Reynolds [Page 15]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
855
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
856
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
857
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
858 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
859 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
860
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
861
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
862 <CRLF> for ASCII, or <NL> for EBCDIC text files, as the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
863 delimiter. If an FTP implementation adopts this technique, it
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
864 must be prepared to reverse the transformation if the file is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
865 retrieved with file-structure.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
866
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
867 3.1.2.1. FILE STRUCTURE
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
868
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
869 File structure is the default to be assumed if the STRUcture
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
870 command has not been used.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
871
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
872 In file-structure there is no internal structure and the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
873 file is considered to be a continuous sequence of data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
874 bytes.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
875
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
876 3.1.2.2. RECORD STRUCTURE
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
877
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
878 Record structures must be accepted for "text" files (i.e.,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
879 files with TYPE ASCII or EBCDIC) by all FTP implementations.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
880
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
881 In record-structure the file is made up of sequential
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
882 records.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
883
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
884 3.1.2.3. PAGE STRUCTURE
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
885
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
886 To transmit files that are discontinuous, FTP defines a page
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
887 structure. Files of this type are sometimes known as
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
888 "random access files" or even as "holey files". In these
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
889 files there is sometimes other information associated with
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
890 the file as a whole (e.g., a file descriptor), or with a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
891 section of the file (e.g., page access controls), or both.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
892 In FTP, the sections of the file are called pages.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
893
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
894 To provide for various page sizes and associated
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
895 information, each page is sent with a page header. The page
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
896 header has the following defined fields:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
897
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
898 Header Length
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
899
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
900 The number of logical bytes in the page header
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
901 including this byte. The minimum header length is 4.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
902
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
903 Page Index
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
904
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
905 The logical page number of this section of the file.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
906 This is not the transmission sequence number of this
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
907 page, but the index used to identify this page of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
908 file.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
909
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
910
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
911 Postel & Reynolds [Page 16]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
912
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
913
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
914
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
915 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
916 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
917
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
918
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
919 Data Length
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
920
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
921 The number of logical bytes in the page data. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
922 minimum data length is 0.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
923
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
924 Page Type
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
925
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
926 The type of page this is. The following page types
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
927 are defined:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
928
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
929 0 = Last Page
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
930
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
931 This is used to indicate the end of a paged
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
932 structured transmission. The header length must
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
933 be 4, and the data length must be 0.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
934
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
935 1 = Simple Page
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
936
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
937 This is the normal type for simple paged files
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
938 with no page level associated control
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
939 information. The header length must be 4.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
940
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
941 2 = Descriptor Page
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
942
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
943 This type is used to transmit the descriptive
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
944 information for the file as a whole.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
945
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
946 3 = Access Controlled Page
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
947
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
948 This type includes an additional header field
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
949 for paged files with page level access control
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
950 information. The header length must be 5.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
951
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
952 Optional Fields
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
953
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
954 Further header fields may be used to supply per page
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
955 control information, for example, per page access
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
956 control.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
957
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
958 All fields are one logical byte in length. The logical byte
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
959 size is specified by the TYPE command. See Appendix I for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
960 further details and a specific case at the page structure.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
961
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
962 A note of caution about parameters: a file must be stored and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
963 retrieved with the same parameters if the retrieved version is to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
964
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
965
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
966
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
967
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
968 Postel & Reynolds [Page 17]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
969
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
970
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
971
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
972 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
973 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
974
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
975
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
976 be identical to the version originally transmitted. Conversely,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
977 FTP implementations must return a file identical to the original
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
978 if the parameters used to store and retrieve a file are the same.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
979
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
980 3.2. ESTABLISHING DATA CONNECTIONS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
981
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
982 The mechanics of transferring data consists of setting up the data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
983 connection to the appropriate ports and choosing the parameters
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
984 for transfer. Both the user and the server-DTPs have a default
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
985 data port. The user-process default data port is the same as the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
986 control connection port (i.e., U). The server-process default
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
987 data port is the port adjacent to the control connection port
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
988 (i.e., L-1).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
989
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
990 The transfer byte size is 8-bit bytes. This byte size is relevant
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
991 only for the actual transfer of the data; it has no bearing on
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
992 representation of the data within a host's file system.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
993
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
994 The passive data transfer process (this may be a user-DTP or a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
995 second server-DTP) shall "listen" on the data port prior to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
996 sending a transfer request command. The FTP request command
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
997 determines the direction of the data transfer. The server, upon
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
998 receiving the transfer request, will initiate the data connection
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
999 to the port. When the connection is established, the data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1000 transfer begins between DTP's, and the server-PI sends a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1001 confirming reply to the user-PI.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1002
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1003 Every FTP implementation must support the use of the default data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1004 ports, and only the USER-PI can initiate a change to non-default
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1005 ports.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1006
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1007 It is possible for the user to specify an alternate data port by
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1008 use of the PORT command. The user may want a file dumped on a TAC
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1009 line printer or retrieved from a third party host. In the latter
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1010 case, the user-PI sets up control connections with both
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1011 server-PI's. One server is then told (by an FTP command) to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1012 "listen" for a connection which the other will initiate. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1013 user-PI sends one server-PI a PORT command indicating the data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1014 port of the other. Finally, both are sent the appropriate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1015 transfer commands. The exact sequence of commands and replies
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1016 sent between the user-controller and the servers is defined in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1017 Section on FTP Replies.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1018
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1019 In general, it is the server's responsibility to maintain the data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1020 connection--to initiate it and to close it. The exception to this
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1021
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1022
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1023
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1024
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1025 Postel & Reynolds [Page 18]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1026
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1027
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1028
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1029 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1030 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1031
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1032
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1033 is when the user-DTP is sending the data in a transfer mode that
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1034 requires the connection to be closed to indicate EOF. The server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1035 MUST close the data connection under the following conditions:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1036
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1037 1. The server has completed sending data in a transfer mode
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1038 that requires a close to indicate EOF.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1039
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1040 2. The server receives an ABORT command from the user.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1041
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1042 3. The port specification is changed by a command from the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1043 user.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1044
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1045 4. The control connection is closed legally or otherwise.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1046
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1047 5. An irrecoverable error condition occurs.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1048
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1049 Otherwise the close is a server option, the exercise of which the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1050 server must indicate to the user-process by either a 250 or 226
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1051 reply only.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1052
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1053 3.3. DATA CONNECTION MANAGEMENT
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1054
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1055 Default Data Connection Ports: All FTP implementations must
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1056 support use of the default data connection ports, and only the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1057 User-PI may initiate the use of non-default ports.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1058
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1059 Negotiating Non-Default Data Ports: The User-PI may specify a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1060 non-default user side data port with the PORT command. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1061 User-PI may request the server side to identify a non-default
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1062 server side data port with the PASV command. Since a connection
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1063 is defined by the pair of addresses, either of these actions is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1064 enough to get a different data connection, still it is permitted
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1065 to do both commands to use new ports on both ends of the data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1066 connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1067
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1068 Reuse of the Data Connection: When using the stream mode of data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1069 transfer the end of the file must be indicated by closing the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1070 connection. This causes a problem if multiple files are to be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1071 transfered in the session, due to need for TCP to hold the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1072 connection record for a time out period to guarantee the reliable
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1073 communication. Thus the connection can not be reopened at once.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1074
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1075 There are two solutions to this problem. The first is to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1076 negotiate a non-default port. The second is to use another
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1077 transfer mode.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1078
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1079 A comment on transfer modes. The stream transfer mode is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1080
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1081
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1082 Postel & Reynolds [Page 19]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1083
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1084
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1085
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1086 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1087 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1088
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1089
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1090 inherently unreliable, since one can not determine if the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1091 connection closed prematurely or not. The other transfer modes
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1092 (Block, Compressed) do not close the connection to indicate the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1093 end of file. They have enough FTP encoding that the data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1094 connection can be parsed to determine the end of the file.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1095 Thus using these modes one can leave the data connection open
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1096 for multiple file transfers.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1097
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1098 3.4. TRANSMISSION MODES
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1099
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1100 The next consideration in transferring data is choosing the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1101 appropriate transmission mode. There are three modes: one which
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1102 formats the data and allows for restart procedures; one which also
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1103 compresses the data for efficient transfer; and one which passes
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1104 the data with little or no processing. In this last case the mode
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1105 interacts with the structure attribute to determine the type of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1106 processing. In the compressed mode, the representation type
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1107 determines the filler byte.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1108
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1109 All data transfers must be completed with an end-of-file (EOF)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1110 which may be explicitly stated or implied by the closing of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1111 data connection. For files with record structure, all the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1112 end-of-record markers (EOR) are explicit, including the final one.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1113 For files transmitted in page structure a "last-page" page type is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1114 used.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1115
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1116 NOTE: In the rest of this section, byte means "transfer byte"
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1117 except where explicitly stated otherwise.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1118
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1119 For the purpose of standardized transfer, the sending host will
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1120 translate its internal end of line or end of record denotation
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1121 into the representation prescribed by the transfer mode and file
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1122 structure, and the receiving host will perform the inverse
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1123 translation to its internal denotation. An IBM Mainframe record
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1124 count field may not be recognized at another host, so the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1125 end-of-record information may be transferred as a two byte control
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1126 code in Stream mode or as a flagged bit in a Block or Compressed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1127 mode descriptor. End-of-line in an ASCII or EBCDIC file with no
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1128 record structure should be indicated by <CRLF> or <NL>,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1129 respectively. Since these transformations imply extra work for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1130 some systems, identical systems transferring non-record structured
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1131 text files might wish to use a binary representation and stream
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1132 mode for the transfer.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1133
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1134
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1135
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1136
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1137
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1138
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1139 Postel & Reynolds [Page 20]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1140
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1141
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1142
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1143 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1144 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1145
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1146
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1147 The following transmission modes are defined in FTP:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1148
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1149 3.4.1. STREAM MODE
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1150
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1151 The data is transmitted as a stream of bytes. There is no
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1152 restriction on the representation type used; record structures
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1153 are allowed.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1154
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1155 In a record structured file EOR and EOF will each be indicated
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1156 by a two-byte control code. The first byte of the control code
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1157 will be all ones, the escape character. The second byte will
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1158 have the low order bit on and zeros elsewhere for EOR and the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1159 second low order bit on for EOF; that is, the byte will have
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1160 value 1 for EOR and value 2 for EOF. EOR and EOF may be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1161 indicated together on the last byte transmitted by turning both
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1162 low order bits on (i.e., the value 3). If a byte of all ones
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1163 was intended to be sent as data, it should be repeated in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1164 second byte of the control code.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1165
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1166 If the structure is a file structure, the EOF is indicated by
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1167 the sending host closing the data connection and all bytes are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1168 data bytes.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1169
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1170 3.4.2. BLOCK MODE
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1171
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1172 The file is transmitted as a series of data blocks preceded by
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1173 one or more header bytes. The header bytes contain a count
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1174 field, and descriptor code. The count field indicates the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1175 total length of the data block in bytes, thus marking the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1176 beginning of the next data block (there are no filler bits).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1177 The descriptor code defines: last block in the file (EOF) last
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1178 block in the record (EOR), restart marker (see the Section on
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1179 Error Recovery and Restart) or suspect data (i.e., the data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1180 being transferred is suspected of errors and is not reliable).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1181 This last code is NOT intended for error control within FTP.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1182 It is motivated by the desire of sites exchanging certain types
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1183 of data (e.g., seismic or weather data) to send and receive all
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1184 the data despite local errors (such as "magnetic tape read
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1185 errors"), but to indicate in the transmission that certain
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1186 portions are suspect). Record structures are allowed in this
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1187 mode, and any representation type may be used.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1188
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1189 The header consists of the three bytes. Of the 24 bits of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1190 header information, the 16 low order bits shall represent byte
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1191 count, and the 8 high order bits shall represent descriptor
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1192 codes as shown below.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1193
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1194
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1195
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1196 Postel & Reynolds [Page 21]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1197
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1198
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1199
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1200 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1201 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1202
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1203
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1204 Block Header
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1205
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1206 +----------------+----------------+----------------+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1207 | Descriptor | Byte Count |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1208 | 8 bits | 16 bits |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1209 +----------------+----------------+----------------+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1210
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1211
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1212 The descriptor codes are indicated by bit flags in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1213 descriptor byte. Four codes have been assigned, where each
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1214 code number is the decimal value of the corresponding bit in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1215 the byte.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1216
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1217 Code Meaning
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1218
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1219 128 End of data block is EOR
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1220 64 End of data block is EOF
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1221 32 Suspected errors in data block
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1222 16 Data block is a restart marker
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1223
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1224 With this encoding, more than one descriptor coded condition
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1225 may exist for a particular block. As many bits as necessary
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1226 may be flagged.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1227
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1228 The restart marker is embedded in the data stream as an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1229 integral number of 8-bit bytes representing printable
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1230 characters in the language being used over the control
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1231 connection (e.g., default--NVT-ASCII). <SP> (Space, in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1232 appropriate language) must not be used WITHIN a restart marker.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1233
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1234 For example, to transmit a six-character marker, the following
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1235 would be sent:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1236
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1237 +--------+--------+--------+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1238 |Descrptr| Byte count |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1239 |code= 16| = 6 |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1240 +--------+--------+--------+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1241
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1242 +--------+--------+--------+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1243 | Marker | Marker | Marker |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1244 | 8 bits | 8 bits | 8 bits |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1245 +--------+--------+--------+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1246
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1247 +--------+--------+--------+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1248 | Marker | Marker | Marker |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1249 | 8 bits | 8 bits | 8 bits |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1250 +--------+--------+--------+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1251
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1252
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1253 Postel & Reynolds [Page 22]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1254
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1255
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1256
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1257 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1258 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1259
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1260
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1261 3.4.3. COMPRESSED MODE
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1262
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1263 There are three kinds of information to be sent: regular data,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1264 sent in a byte string; compressed data, consisting of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1265 replications or filler; and control information, sent in a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1266 two-byte escape sequence. If n>0 bytes (up to 127) of regular
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1267 data are sent, these n bytes are preceded by a byte with the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1268 left-most bit set to 0 and the right-most 7 bits containing the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1269 number n.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1270
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1271 Byte string:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1272
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1273 1 7 8 8
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1274 +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1275 |0| n | | d(1) | ... | d(n) |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1276 +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1277 ^ ^
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1278 |---n bytes---|
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1279 of data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1280
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1281 String of n data bytes d(1),..., d(n)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1282 Count n must be positive.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1283
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1284 To compress a string of n replications of the data byte d, the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1285 following 2 bytes are sent:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1286
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1287 Replicated Byte:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1288
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1289 2 6 8
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1290 +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1291 |1 0| n | | d |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1292 +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1293
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1294 A string of n filler bytes can be compressed into a single
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1295 byte, where the filler byte varies with the representation
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1296 type. If the type is ASCII or EBCDIC the filler byte is <SP>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1297 (Space, ASCII code 32, EBCDIC code 64). If the type is Image
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1298 or Local byte the filler is a zero byte.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1299
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1300 Filler String:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1301
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1302 2 6
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1303 +-+-+-+-+-+-+-+-+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1304 |1 1| n |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1305 +-+-+-+-+-+-+-+-+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1306
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1307 The escape sequence is a double byte, the first of which is the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1308
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1309
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1310 Postel & Reynolds [Page 23]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1311
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1312
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1313
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1314 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1315 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1316
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1317
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1318 escape byte (all zeros) and the second of which contains
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1319 descriptor codes as defined in Block mode. The descriptor
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1320 codes have the same meaning as in Block mode and apply to the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1321 succeeding string of bytes.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1322
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1323 Compressed mode is useful for obtaining increased bandwidth on
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1324 very large network transmissions at a little extra CPU cost.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1325 It can be most effectively used to reduce the size of printer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1326 files such as those generated by RJE hosts.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1327
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1328 3.5. ERROR RECOVERY AND RESTART
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1329
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1330 There is no provision for detecting bits lost or scrambled in data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1331 transfer; this level of error control is handled by the TCP.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1332 However, a restart procedure is provided to protect users from
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1333 gross system failures (including failures of a host, an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1334 FTP-process, or the underlying network).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1335
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1336 The restart procedure is defined only for the block and compressed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1337 modes of data transfer. It requires the sender of data to insert
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1338 a special marker code in the data stream with some marker
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1339 information. The marker information has meaning only to the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1340 sender, but must consist of printable characters in the default or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1341 negotiated language of the control connection (ASCII or EBCDIC).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1342 The marker could represent a bit-count, a record-count, or any
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1343 other information by which a system may identify a data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1344 checkpoint. The receiver of data, if it implements the restart
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1345 procedure, would then mark the corresponding position of this
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1346 marker in the receiving system, and return this information to the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1347 user.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1348
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1349 In the event of a system failure, the user can restart the data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1350 transfer by identifying the marker point with the FTP restart
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1351 procedure. The following example illustrates the use of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1352 restart procedure.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1353
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1354 The sender of the data inserts an appropriate marker block in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1355 data stream at a convenient point. The receiving host marks the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1356 corresponding data point in its file system and conveys the last
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1357 known sender and receiver marker information to the user, either
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1358 directly or over the control connection in a 110 reply (depending
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1359 on who is the sender). In the event of a system failure, the user
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1360 or controller process restarts the server at the last server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1361 marker by sending a restart command with server's marker code as
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1362 its argument. The restart command is transmitted over the control
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1363
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1364
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1365
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1366
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1367 Postel & Reynolds [Page 24]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1368
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1369
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1370
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1371 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1372 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1373
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1374
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1375 connection and is immediately followed by the command (such as
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1376 RETR, STOR or LIST) which was being executed when the system
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1377 failure occurred.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1378
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1379 4. FILE TRANSFER FUNCTIONS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1380
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1381 The communication channel from the user-PI to the server-PI is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1382 established as a TCP connection from the user to the standard server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1383 port. The user protocol interpreter is responsible for sending FTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1384 commands and interpreting the replies received; the server-PI
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1385 interprets commands, sends replies and directs its DTP to set up the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1386 data connection and transfer the data. If the second party to the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1387 data transfer (the passive transfer process) is the user-DTP, then it
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1388 is governed through the internal protocol of the user-FTP host; if it
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1389 is a second server-DTP, then it is governed by its PI on command from
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1390 the user-PI. The FTP replies are discussed in the next section. In
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1391 the description of a few of the commands in this section, it is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1392 helpful to be explicit about the possible replies.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1393
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1394 4.1. FTP COMMANDS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1395
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1396 4.1.1. ACCESS CONTROL COMMANDS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1397
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1398 The following commands specify access control identifiers
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1399 (command codes are shown in parentheses).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1400
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1401 USER NAME (USER)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1402
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1403 The argument field is a Telnet string identifying the user.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1404 The user identification is that which is required by the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1405 server for access to its file system. This command will
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1406 normally be the first command transmitted by the user after
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1407 the control connections are made (some servers may require
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1408 this). Additional identification information in the form of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1409 a password and/or an account command may also be required by
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1410 some servers. Servers may allow a new USER command to be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1411 entered at any point in order to change the access control
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1412 and/or accounting information. This has the effect of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1413 flushing any user, password, and account information already
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1414 supplied and beginning the login sequence again. All
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1415 transfer parameters are unchanged and any file transfer in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1416 progress is completed under the old access control
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1417 parameters.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1418
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1419
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1420
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1421
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1422
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1423
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1424 Postel & Reynolds [Page 25]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1425
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1426
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1427
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1428 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1429 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1430
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1431
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1432 PASSWORD (PASS)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1433
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1434 The argument field is a Telnet string specifying the user's
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1435 password. This command must be immediately preceded by the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1436 user name command, and, for some sites, completes the user's
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1437 identification for access control. Since password
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1438 information is quite sensitive, it is desirable in general
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1439 to "mask" it or suppress typeout. It appears that the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1440 server has no foolproof way to achieve this. It is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1441 therefore the responsibility of the user-FTP process to hide
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1442 the sensitive password information.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1443
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1444 ACCOUNT (ACCT)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1445
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1446 The argument field is a Telnet string identifying the user's
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1447 account. The command is not necessarily related to the USER
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1448 command, as some sites may require an account for login and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1449 others only for specific access, such as storing files. In
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1450 the latter case the command may arrive at any time.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1451
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1452 There are reply codes to differentiate these cases for the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1453 automation: when account information is required for login,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1454 the response to a successful PASSword command is reply code
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1455 332. On the other hand, if account information is NOT
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1456 required for login, the reply to a successful PASSword
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1457 command is 230; and if the account information is needed for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1458 a command issued later in the dialogue, the server should
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1459 return a 332 or 532 reply depending on whether it stores
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1460 (pending receipt of the ACCounT command) or discards the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1461 command, respectively.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1462
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1463 CHANGE WORKING DIRECTORY (CWD)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1464
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1465 This command allows the user to work with a different
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1466 directory or dataset for file storage or retrieval without
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1467 altering his login or accounting information. Transfer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1468 parameters are similarly unchanged. The argument is a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1469 pathname specifying a directory or other system dependent
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1470 file group designator.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1471
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1472 CHANGE TO PARENT DIRECTORY (CDUP)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1473
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1474 This command is a special case of CWD, and is included to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1475 simplify the implementation of programs for transferring
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1476 directory trees between operating systems having different
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1477
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1478
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1479
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1480
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1481 Postel & Reynolds [Page 26]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1482
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1483
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1484
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1485 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1486 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1487
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1488
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1489 syntaxes for naming the parent directory. The reply codes
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1490 shall be identical to the reply codes of CWD. See
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1491 Appendix II for further details.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1492
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1493 STRUCTURE MOUNT (SMNT)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1494
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1495 This command allows the user to mount a different file
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1496 system data structure without altering his login or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1497 accounting information. Transfer parameters are similarly
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1498 unchanged. The argument is a pathname specifying a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1499 directory or other system dependent file group designator.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1500
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1501 REINITIALIZE (REIN)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1502
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1503 This command terminates a USER, flushing all I/O and account
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1504 information, except to allow any transfer in progress to be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1505 completed. All parameters are reset to the default settings
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1506 and the control connection is left open. This is identical
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1507 to the state in which a user finds himself immediately after
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1508 the control connection is opened. A USER command may be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1509 expected to follow.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1510
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1511 LOGOUT (QUIT)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1512
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1513 This command terminates a USER and if file transfer is not
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1514 in progress, the server closes the control connection. If
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1515 file transfer is in progress, the connection will remain
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1516 open for result response and the server will then close it.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1517 If the user-process is transferring files for several USERs
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1518 but does not wish to close and then reopen connections for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1519 each, then the REIN command should be used instead of QUIT.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1520
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1521 An unexpected close on the control connection will cause the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1522 server to take the effective action of an abort (ABOR) and a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1523 logout (QUIT).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1524
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1525 4.1.2. TRANSFER PARAMETER COMMANDS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1526
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1527 All data transfer parameters have default values, and the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1528 commands specifying data transfer parameters are required only
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1529 if the default parameter values are to be changed. The default
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1530 value is the last specified value, or if no value has been
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1531 specified, the standard default value is as stated here. This
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1532 implies that the server must "remember" the applicable default
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1533 values. The commands may be in any order except that they must
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1534 precede the FTP service request. The following commands
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1535 specify data transfer parameters:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1536
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1537
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1538 Postel & Reynolds [Page 27]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1539
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1540
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1541
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1542 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1543 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1544
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1545
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1546 DATA PORT (PORT)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1547
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1548 The argument is a HOST-PORT specification for the data port
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1549 to be used in data connection. There are defaults for both
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1550 the user and server data ports, and under normal
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1551 circumstances this command and its reply are not needed. If
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1552 this command is used, the argument is the concatenation of a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1553 32-bit internet host address and a 16-bit TCP port address.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1554 This address information is broken into 8-bit fields and the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1555 value of each field is transmitted as a decimal number (in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1556 character string representation). The fields are separated
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1557 by commas. A port command would be:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1558
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1559 PORT h1,h2,h3,h4,p1,p2
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1560
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1561 where h1 is the high order 8 bits of the internet host
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1562 address.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1563
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1564 PASSIVE (PASV)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1565
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1566 This command requests the server-DTP to "listen" on a data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1567 port (which is not its default data port) and to wait for a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1568 connection rather than initiate one upon receipt of a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1569 transfer command. The response to this command includes the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1570 host and port address this server is listening on.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1571
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1572 REPRESENTATION TYPE (TYPE)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1573
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1574 The argument specifies the representation type as described
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1575 in the Section on Data Representation and Storage. Several
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1576 types take a second parameter. The first parameter is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1577 denoted by a single Telnet character, as is the second
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1578 Format parameter for ASCII and EBCDIC; the second parameter
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1579 for local byte is a decimal integer to indicate Bytesize.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1580 The parameters are separated by a <SP> (Space, ASCII code
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1581 32).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1582
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1583 The following codes are assigned for type:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1584
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1585 \ /
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1586 A - ASCII | | N - Non-print
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1587 |-><-| T - Telnet format effectors
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1588 E - EBCDIC| | C - Carriage Control (ASA)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1589 / \
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1590 I - Image
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1591
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1592 L <byte size> - Local byte Byte size
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1593
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1594
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1595 Postel & Reynolds [Page 28]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1596
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1597
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1598
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1599 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1600 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1601
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1602
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1603 The default representation type is ASCII Non-print. If the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1604 Format parameter is changed, and later just the first
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1605 argument is changed, Format then returns to the Non-print
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1606 default.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1607
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1608 FILE STRUCTURE (STRU)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1609
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1610 The argument is a single Telnet character code specifying
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1611 file structure described in the Section on Data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1612 Representation and Storage.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1613
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1614 The following codes are assigned for structure:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1615
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1616 F - File (no record structure)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1617 R - Record structure
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1618 P - Page structure
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1619
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1620 The default structure is File.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1621
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1622 TRANSFER MODE (MODE)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1623
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1624 The argument is a single Telnet character code specifying
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1625 the data transfer modes described in the Section on
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1626 Transmission Modes.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1627
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1628 The following codes are assigned for transfer modes:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1629
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1630 S - Stream
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1631 B - Block
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1632 C - Compressed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1633
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1634 The default transfer mode is Stream.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1635
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1636 4.1.3. FTP SERVICE COMMANDS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1637
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1638 The FTP service commands define the file transfer or the file
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1639 system function requested by the user. The argument of an FTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1640 service command will normally be a pathname. The syntax of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1641 pathnames must conform to server site conventions (with
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1642 standard defaults applicable), and the language conventions of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1643 the control connection. The suggested default handling is to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1644 use the last specified device, directory or file name, or the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1645 standard default defined for local users. The commands may be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1646 in any order except that a "rename from" command must be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1647 followed by a "rename to" command and the restart command must
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1648 be followed by the interrupted service command (e.g., STOR or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1649 RETR). The data, when transferred in response to FTP service
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1650
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1651
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1652 Postel & Reynolds [Page 29]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1653
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1654
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1655
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1656 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1657 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1658
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1659
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1660 commands, shall always be sent over the data connection, except
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1661 for certain informative replies. The following commands
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1662 specify FTP service requests:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1663
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1664 RETRIEVE (RETR)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1665
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1666 This command causes the server-DTP to transfer a copy of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1667 file, specified in the pathname, to the server- or user-DTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1668 at the other end of the data connection. The status and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1669 contents of the file at the server site shall be unaffected.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1670
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1671 STORE (STOR)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1672
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1673 This command causes the server-DTP to accept the data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1674 transferred via the data connection and to store the data as
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1675 a file at the server site. If the file specified in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1676 pathname exists at the server site, then its contents shall
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1677 be replaced by the data being transferred. A new file is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1678 created at the server site if the file specified in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1679 pathname does not already exist.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1680
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1681 STORE UNIQUE (STOU)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1682
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1683 This command behaves like STOR except that the resultant
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1684 file is to be created in the current directory under a name
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1685 unique to that directory. The 250 Transfer Started response
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1686 must include the name generated.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1687
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1688 APPEND (with create) (APPE)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1689
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1690 This command causes the server-DTP to accept the data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1691 transferred via the data connection and to store the data in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1692 a file at the server site. If the file specified in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1693 pathname exists at the server site, then the data shall be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1694 appended to that file; otherwise the file specified in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1695 pathname shall be created at the server site.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1696
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1697 ALLOCATE (ALLO)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1698
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1699 This command may be required by some servers to reserve
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1700 sufficient storage to accommodate the new file to be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1701 transferred. The argument shall be a decimal integer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1702 representing the number of bytes (using the logical byte
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1703 size) of storage to be reserved for the file. For files
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1704 sent with record or page structure a maximum record or page
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1705 size (in logical bytes) might also be necessary; this is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1706 indicated by a decimal integer in a second argument field of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1707
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1708
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1709 Postel & Reynolds [Page 30]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1710
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1711
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1712
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1713 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1714 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1715
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1716
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1717 the command. This second argument is optional, but when
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1718 present should be separated from the first by the three
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1719 Telnet characters <SP> R <SP>. This command shall be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1720 followed by a STORe or APPEnd command. The ALLO command
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1721 should be treated as a NOOP (no operation) by those servers
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1722 which do not require that the maximum size of the file be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1723 declared beforehand, and those servers interested in only
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1724 the maximum record or page size should accept a dummy value
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1725 in the first argument and ignore it.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1726
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1727 RESTART (REST)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1728
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1729 The argument field represents the server marker at which
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1730 file transfer is to be restarted. This command does not
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1731 cause file transfer but skips over the file to the specified
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1732 data checkpoint. This command shall be immediately followed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1733 by the appropriate FTP service command which shall cause
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1734 file transfer to resume.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1735
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1736 RENAME FROM (RNFR)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1737
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1738 This command specifies the old pathname of the file which is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1739 to be renamed. This command must be immediately followed by
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1740 a "rename to" command specifying the new file pathname.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1741
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1742 RENAME TO (RNTO)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1743
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1744 This command specifies the new pathname of the file
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1745 specified in the immediately preceding "rename from"
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1746 command. Together the two commands cause a file to be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1747 renamed.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1748
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1749 ABORT (ABOR)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1750
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1751 This command tells the server to abort the previous FTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1752 service command and any associated transfer of data. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1753 abort command may require "special action", as discussed in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1754 the Section on FTP Commands, to force recognition by the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1755 server. No action is to be taken if the previous command
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1756 has been completed (including data transfer). The control
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1757 connection is not to be closed by the server, but the data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1758 connection must be closed.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1759
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1760 There are two cases for the server upon receipt of this
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1761 command: (1) the FTP service command was already completed,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1762 or (2) the FTP service command is still in progress.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1763
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1764
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1765
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1766 Postel & Reynolds [Page 31]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1767
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1768
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1769
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1770 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1771 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1772
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1773
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1774 In the first case, the server closes the data connection
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1775 (if it is open) and responds with a 226 reply, indicating
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1776 that the abort command was successfully processed.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1777
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1778 In the second case, the server aborts the FTP service in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1779 progress and closes the data connection, returning a 426
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1780 reply to indicate that the service request terminated
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1781 abnormally. The server then sends a 226 reply,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1782 indicating that the abort command was successfully
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1783 processed.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1784
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1785 DELETE (DELE)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1786
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1787 This command causes the file specified in the pathname to be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1788 deleted at the server site. If an extra level of protection
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1789 is desired (such as the query, "Do you really wish to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1790 delete?"), it should be provided by the user-FTP process.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1791
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1792 REMOVE DIRECTORY (RMD)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1793
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1794 This command causes the directory specified in the pathname
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1795 to be removed as a directory (if the pathname is absolute)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1796 or as a subdirectory of the current working directory (if
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1797 the pathname is relative). See Appendix II.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1798
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1799 MAKE DIRECTORY (MKD)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1800
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1801 This command causes the directory specified in the pathname
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1802 to be created as a directory (if the pathname is absolute)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1803 or as a subdirectory of the current working directory (if
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1804 the pathname is relative). See Appendix II.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1805
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1806 PRINT WORKING DIRECTORY (PWD)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1807
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1808 This command causes the name of the current working
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1809 directory to be returned in the reply. See Appendix II.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1810
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1811 LIST (LIST)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1812
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1813 This command causes a list to be sent from the server to the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1814 passive DTP. If the pathname specifies a directory or other
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1815 group of files, the server should transfer a list of files
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1816 in the specified directory. If the pathname specifies a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1817 file then the server should send current information on the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1818 file. A null argument implies the user's current working or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1819 default directory. The data transfer is over the data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1820 connection in type ASCII or type EBCDIC. (The user must
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1821
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1822
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1823 Postel & Reynolds [Page 32]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1824
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1825
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1826
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1827 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1828 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1829
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1830
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1831 ensure that the TYPE is appropriately ASCII or EBCDIC).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1832 Since the information on a file may vary widely from system
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1833 to system, this information may be hard to use automatically
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1834 in a program, but may be quite useful to a human user.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1835
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1836 NAME LIST (NLST)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1837
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1838 This command causes a directory listing to be sent from
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1839 server to user site. The pathname should specify a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1840 directory or other system-specific file group descriptor; a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1841 null argument implies the current directory. The server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1842 will return a stream of names of files and no other
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1843 information. The data will be transferred in ASCII or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1844 EBCDIC type over the data connection as valid pathname
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1845 strings separated by <CRLF> or <NL>. (Again the user must
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1846 ensure that the TYPE is correct.) This command is intended
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1847 to return information that can be used by a program to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1848 further process the files automatically. For example, in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1849 the implementation of a "multiple get" function.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1850
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1851 SITE PARAMETERS (SITE)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1852
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1853 This command is used by the server to provide services
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1854 specific to his system that are essential to file transfer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1855 but not sufficiently universal to be included as commands in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1856 the protocol. The nature of these services and the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1857 specification of their syntax can be stated in a reply to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1858 the HELP SITE command.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1859
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1860 SYSTEM (SYST)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1861
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1862 This command is used to find out the type of operating
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1863 system at the server. The reply shall have as its first
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1864 word one of the system names listed in the current version
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1865 of the Assigned Numbers document [4].
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1866
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1867 STATUS (STAT)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1868
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1869 This command shall cause a status response to be sent over
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1870 the control connection in the form of a reply. The command
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1871 may be sent during a file transfer (along with the Telnet IP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1872 and Synch signals--see the Section on FTP Commands) in which
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1873 case the server will respond with the status of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1874 operation in progress, or it may be sent between file
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1875 transfers. In the latter case, the command may have an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1876 argument field. If the argument is a pathname, the command
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1877 is analogous to the "list" command except that data shall be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1878
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1879
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1880 Postel & Reynolds [Page 33]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1881
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1882
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1883
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1884 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1885 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1886
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1887
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1888 transferred over the control connection. If a partial
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1889 pathname is given, the server may respond with a list of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1890 file names or attributes associated with that specification.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1891 If no argument is given, the server should return general
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1892 status information about the server FTP process. This
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1893 should include current values of all transfer parameters and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1894 the status of connections.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1895
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1896 HELP (HELP)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1897
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1898 This command shall cause the server to send helpful
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1899 information regarding its implementation status over the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1900 control connection to the user. The command may take an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1901 argument (e.g., any command name) and return more specific
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1902 information as a response. The reply is type 211 or 214.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1903 It is suggested that HELP be allowed before entering a USER
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1904 command. The server may use this reply to specify
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1905 site-dependent parameters, e.g., in response to HELP SITE.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1906
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1907 NOOP (NOOP)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1908
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1909 This command does not affect any parameters or previously
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1910 entered commands. It specifies no action other than that the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1911 server send an OK reply.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1912
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1913 The File Transfer Protocol follows the specifications of the Telnet
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1914 protocol for all communications over the control connection. Since
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1915 the language used for Telnet communication may be a negotiated
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1916 option, all references in the next two sections will be to the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1917 "Telnet language" and the corresponding "Telnet end-of-line code".
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1918 Currently, one may take these to mean NVT-ASCII and <CRLF>. No other
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1919 specifications of the Telnet protocol will be cited.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1920
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1921 FTP commands are "Telnet strings" terminated by the "Telnet end of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1922 line code". The command codes themselves are alphabetic characters
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1923 terminated by the character <SP> (Space) if parameters follow and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1924 Telnet-EOL otherwise. The command codes and the semantics of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1925 commands are described in this section; the detailed syntax of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1926 commands is specified in the Section on Commands, the reply sequences
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1927 are discussed in the Section on Sequencing of Commands and Replies,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1928 and scenarios illustrating the use of commands are provided in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1929 Section on Typical FTP Scenarios.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1930
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1931 FTP commands may be partitioned as those specifying access-control
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1932 identifiers, data transfer parameters, or FTP service requests.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1933 Certain commands (such as ABOR, STAT, QUIT) may be sent over the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1934 control connection while a data transfer is in progress. Some
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1935
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1936
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1937 Postel & Reynolds [Page 34]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1938
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1939
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1940
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1941 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1942 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1943
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1944
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1945 servers may not be able to monitor the control and data connections
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1946 simultaneously, in which case some special action will be necessary
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1947 to get the server's attention. The following ordered format is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1948 tentatively recommended:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1949
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1950 1. User system inserts the Telnet "Interrupt Process" (IP) signal
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1951 in the Telnet stream.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1952
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1953 2. User system sends the Telnet "Synch" signal.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1954
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1955 3. User system inserts the command (e.g., ABOR) in the Telnet
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1956 stream.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1957
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1958 4. Server PI, after receiving "IP", scans the Telnet stream for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1959 EXACTLY ONE FTP command.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1960
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1961 (For other servers this may not be necessary but the actions listed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1962 above should have no unusual effect.)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1963
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1964 4.2. FTP REPLIES
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1965
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1966 Replies to File Transfer Protocol commands are devised to ensure
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1967 the synchronization of requests and actions in the process of file
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1968 transfer, and to guarantee that the user process always knows the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1969 state of the Server. Every command must generate at least one
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1970 reply, although there may be more than one; in the latter case,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1971 the multiple replies must be easily distinguished. In addition,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1972 some commands occur in sequential groups, such as USER, PASS and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1973 ACCT, or RNFR and RNTO. The replies show the existence of an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1974 intermediate state if all preceding commands have been successful.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1975 A failure at any point in the sequence necessitates the repetition
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1976 of the entire sequence from the beginning.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1977
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1978 The details of the command-reply sequence are made explicit in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1979 a set of state diagrams below.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1980
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1981 An FTP reply consists of a three digit number (transmitted as
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1982 three alphanumeric characters) followed by some text. The number
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1983 is intended for use by automata to determine what state to enter
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1984 next; the text is intended for the human user. It is intended
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1985 that the three digits contain enough encoded information that the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1986 user-process (the User-PI) will not need to examine the text and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1987 may either discard it or pass it on to the user, as appropriate.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1988 In particular, the text may be server-dependent, so there are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1989 likely to be varying texts for each reply code.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1990
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1991 A reply is defined to contain the 3-digit code, followed by Space
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1992
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1993
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1994 Postel & Reynolds [Page 35]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1995
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1996
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1997
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1998 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1999 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2000
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2001
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2002 <SP>, followed by one line of text (where some maximum line length
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2003 has been specified), and terminated by the Telnet end-of-line
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2004 code. There will be cases however, where the text is longer than
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2005 a single line. In these cases the complete text must be bracketed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2006 so the User-process knows when it may stop reading the reply (i.e.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2007 stop processing input on the control connection) and go do other
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2008 things. This requires a special format on the first line to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2009 indicate that more than one line is coming, and another on the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2010 last line to designate it as the last. At least one of these must
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2011 contain the appropriate reply code to indicate the state of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2012 transaction. To satisfy all factions, it was decided that both
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2013 the first and last line codes should be the same.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2014
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2015 Thus the format for multi-line replies is that the first line
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2016 will begin with the exact required reply code, followed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2017 immediately by a Hyphen, "-" (also known as Minus), followed by
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2018 text. The last line will begin with the same code, followed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2019 immediately by Space <SP>, optionally some text, and the Telnet
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2020 end-of-line code.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2021
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2022 For example:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2023 123-First line
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2024 Second line
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2025 234 A line beginning with numbers
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2026 123 The last line
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2027
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2028 The user-process then simply needs to search for the second
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2029 occurrence of the same reply code, followed by <SP> (Space), at
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2030 the beginning of a line, and ignore all intermediary lines. If
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2031 an intermediary line begins with a 3-digit number, the Server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2032 must pad the front to avoid confusion.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2033
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2034 This scheme allows standard system routines to be used for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2035 reply information (such as for the STAT reply), with
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2036 "artificial" first and last lines tacked on. In rare cases
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2037 where these routines are able to generate three digits and a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2038 Space at the beginning of any line, the beginning of each
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2039 text line should be offset by some neutral text, like Space.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2040
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2041 This scheme assumes that multi-line replies may not be nested.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2042
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2043 The three digits of the reply each have a special significance.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2044 This is intended to allow a range of very simple to very
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2045 sophisticated responses by the user-process. The first digit
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2046 denotes whether the response is good, bad or incomplete.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2047 (Referring to the state diagram), an unsophisticated user-process
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2048 will be able to determine its next action (proceed as planned,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2049
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2050
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2051 Postel & Reynolds [Page 36]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2052
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2053
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2054
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2055 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2056 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2057
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2058
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2059 redo, retrench, etc.) by simply examining this first digit. A
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2060 user-process that wants to know approximately what kind of error
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2061 occurred (e.g. file system error, command syntax error) may
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2062 examine the second digit, reserving the third digit for the finest
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2063 gradation of information (e.g., RNTO command without a preceding
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2064 RNFR).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2065
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2066 There are five values for the first digit of the reply code:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2067
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2068 1yz Positive Preliminary reply
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2069
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2070 The requested action is being initiated; expect another
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2071 reply before proceeding with a new command. (The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2072 user-process sending another command before the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2073 completion reply would be in violation of protocol; but
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2074 server-FTP processes should queue any commands that
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2075 arrive while a preceding command is in progress.) This
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2076 type of reply can be used to indicate that the command
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2077 was accepted and the user-process may now pay attention
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2078 to the data connections, for implementations where
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2079 simultaneous monitoring is difficult. The server-FTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2080 process may send at most, one 1yz reply per command.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2081
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2082 2yz Positive Completion reply
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2083
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2084 The requested action has been successfully completed. A
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2085 new request may be initiated.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2086
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2087 3yz Positive Intermediate reply
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2088
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2089 The command has been accepted, but the requested action
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2090 is being held in abeyance, pending receipt of further
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2091 information. The user should send another command
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2092 specifying this information. This reply is used in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2093 command sequence groups.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2094
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2095 4yz Transient Negative Completion reply
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2096
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2097 The command was not accepted and the requested action did
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2098 not take place, but the error condition is temporary and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2099 the action may be requested again. The user should
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2100 return to the beginning of the command sequence, if any.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2101 It is difficult to assign a meaning to "transient",
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2102 particularly when two distinct sites (Server- and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2103 User-processes) have to agree on the interpretation.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2104 Each reply in the 4yz category might have a slightly
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2105 different time value, but the intent is that the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2106
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2107
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2108 Postel & Reynolds [Page 37]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2109
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2110
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2111
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2112 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2113 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2114
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2115
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2116 user-process is encouraged to try again. A rule of thumb
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2117 in determining if a reply fits into the 4yz or the 5yz
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2118 (Permanent Negative) category is that replies are 4yz if
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2119 the commands can be repeated without any change in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2120 command form or in properties of the User or Server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2121 (e.g., the command is spelled the same with the same
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2122 arguments used; the user does not change his file access
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2123 or user name; the server does not put up a new
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2124 implementation.)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2125
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2126 5yz Permanent Negative Completion reply
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2127
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2128 The command was not accepted and the requested action did
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2129 not take place. The User-process is discouraged from
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2130 repeating the exact request (in the same sequence). Even
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2131 some "permanent" error conditions can be corrected, so
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2132 the human user may want to direct his User-process to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2133 reinitiate the command sequence by direct action at some
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2134 point in the future (e.g., after the spelling has been
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2135 changed, or the user has altered his directory status.)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2136
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2137 The following function groupings are encoded in the second
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2138 digit:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2139
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2140 x0z Syntax - These replies refer to syntax errors,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2141 syntactically correct commands that don't fit any
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2142 functional category, unimplemented or superfluous
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2143 commands.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2144
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2145 x1z Information - These are replies to requests for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2146 information, such as status or help.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2147
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2148 x2z Connections - Replies referring to the control and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2149 data connections.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2150
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2151 x3z Authentication and accounting - Replies for the login
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2152 process and accounting procedures.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2153
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2154 x4z Unspecified as yet.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2155
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2156 x5z File system - These replies indicate the status of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2157 Server file system vis-a-vis the requested transfer or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2158 other file system action.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2159
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2160 The third digit gives a finer gradation of meaning in each of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2161 the function categories, specified by the second digit. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2162 list of replies below will illustrate this. Note that the text
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2163
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2164
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2165 Postel & Reynolds [Page 38]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2166
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2167
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2168
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2169 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2170 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2171
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2172
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2173 associated with each reply is recommended, rather than
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2174 mandatory, and may even change according to the command with
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2175 which it is associated. The reply codes, on the other hand,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2176 must strictly follow the specifications in the last section;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2177 that is, Server implementations should not invent new codes for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2178 situations that are only slightly different from the ones
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2179 described here, but rather should adapt codes already defined.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2180
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2181 A command such as TYPE or ALLO whose successful execution
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2182 does not offer the user-process any new information will
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2183 cause a 200 reply to be returned. If the command is not
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2184 implemented by a particular Server-FTP process because it
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2185 has no relevance to that computer system, for example ALLO
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2186 at a TOPS20 site, a Positive Completion reply is still
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2187 desired so that the simple User-process knows it can proceed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2188 with its course of action. A 202 reply is used in this case
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2189 with, for example, the reply text: "No storage allocation
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2190 necessary." If, on the other hand, the command requests a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2191 non-site-specific action and is unimplemented, the response
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2192 is 502. A refinement of that is the 504 reply for a command
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2193 that is implemented, but that requests an unimplemented
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2194 parameter.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2195
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2196 4.2.1 Reply Codes by Function Groups
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2197
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2198 200 Command okay.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2199 500 Syntax error, command unrecognized.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2200 This may include errors such as command line too long.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2201 501 Syntax error in parameters or arguments.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2202 202 Command not implemented, superfluous at this site.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2203 502 Command not implemented.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2204 503 Bad sequence of commands.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2205 504 Command not implemented for that parameter.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2206
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2207
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2208
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2209
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2210
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2211
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2212
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2213
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2214
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2215
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2216
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2217
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2218
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2219
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2220
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2221
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2222 Postel & Reynolds [Page 39]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2223
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2224
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2225
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2226 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2227 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2228
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2229
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2230 110 Restart marker reply.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2231 In this case, the text is exact and not left to the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2232 particular implementation; it must read:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2233 MARK yyyy = mmmm
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2234 Where yyyy is User-process data stream marker, and mmmm
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2235 server's equivalent marker (note the spaces between markers
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2236 and "=").
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2237 211 System status, or system help reply.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2238 212 Directory status.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2239 213 File status.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2240 214 Help message.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2241 On how to use the server or the meaning of a particular
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2242 non-standard command. This reply is useful only to the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2243 human user.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2244 215 NAME system type.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2245 Where NAME is an official system name from the list in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2246 Assigned Numbers document.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2247
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2248 120 Service ready in nnn minutes.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2249 220 Service ready for new user.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2250 221 Service closing control connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2251 Logged out if appropriate.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2252 421 Service not available, closing control connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2253 This may be a reply to any command if the service knows it
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2254 must shut down.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2255 125 Data connection already open; transfer starting.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2256 225 Data connection open; no transfer in progress.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2257 425 Can't open data connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2258 226 Closing data connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2259 Requested file action successful (for example, file
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2260 transfer or file abort).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2261 426 Connection closed; transfer aborted.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2262 227 Entering Passive Mode (h1,h2,h3,h4,p1,p2).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2263
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2264 230 User logged in, proceed.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2265 530 Not logged in.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2266 331 User name okay, need password.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2267 332 Need account for login.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2268 532 Need account for storing files.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2269
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2270
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2271
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2272
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2273
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2274
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2275
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2276
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2277
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2278
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2279 Postel & Reynolds [Page 40]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2280
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2281
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2282
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2283 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2284 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2285
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2286
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2287 150 File status okay; about to open data connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2288 250 Requested file action okay, completed.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2289 257 "PATHNAME" created.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2290 350 Requested file action pending further information.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2291 450 Requested file action not taken.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2292 File unavailable (e.g., file busy).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2293 550 Requested action not taken.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2294 File unavailable (e.g., file not found, no access).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2295 451 Requested action aborted. Local error in processing.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2296 551 Requested action aborted. Page type unknown.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2297 452 Requested action not taken.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2298 Insufficient storage space in system.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2299 552 Requested file action aborted.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2300 Exceeded storage allocation (for current directory or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2301 dataset).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2302 553 Requested action not taken.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2303 File name not allowed.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2304
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2305
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2306 4.2.2 Numeric Order List of Reply Codes
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2307
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2308 110 Restart marker reply.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2309 In this case, the text is exact and not left to the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2310 particular implementation; it must read:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2311 MARK yyyy = mmmm
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2312 Where yyyy is User-process data stream marker, and mmmm
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2313 server's equivalent marker (note the spaces between markers
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2314 and "=").
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2315 120 Service ready in nnn minutes.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2316 125 Data connection already open; transfer starting.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2317 150 File status okay; about to open data connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2318
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2319
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2320
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2321
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2322
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2323
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2324
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2325
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2326
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2327
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2328
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2329
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2330
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2331
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2332
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2333
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2334
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2335
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2336 Postel & Reynolds [Page 41]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2337
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2338
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2339
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2340 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2341 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2342
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2343
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2344 200 Command okay.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2345 202 Command not implemented, superfluous at this site.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2346 211 System status, or system help reply.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2347 212 Directory status.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2348 213 File status.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2349 214 Help message.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2350 On how to use the server or the meaning of a particular
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2351 non-standard command. This reply is useful only to the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2352 human user.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2353 215 NAME system type.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2354 Where NAME is an official system name from the list in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2355 Assigned Numbers document.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2356 220 Service ready for new user.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2357 221 Service closing control connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2358 Logged out if appropriate.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2359 225 Data connection open; no transfer in progress.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2360 226 Closing data connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2361 Requested file action successful (for example, file
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2362 transfer or file abort).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2363 227 Entering Passive Mode (h1,h2,h3,h4,p1,p2).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2364 230 User logged in, proceed.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2365 250 Requested file action okay, completed.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2366 257 "PATHNAME" created.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2367
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2368 331 User name okay, need password.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2369 332 Need account for login.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2370 350 Requested file action pending further information.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2371
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2372 421 Service not available, closing control connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2373 This may be a reply to any command if the service knows it
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2374 must shut down.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2375 425 Can't open data connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2376 426 Connection closed; transfer aborted.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2377 450 Requested file action not taken.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2378 File unavailable (e.g., file busy).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2379 451 Requested action aborted: local error in processing.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2380 452 Requested action not taken.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2381 Insufficient storage space in system.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2382
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2383
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2384
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2385
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2386
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2387
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2388
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2389
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2390
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2391
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2392
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2393 Postel & Reynolds [Page 42]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2394
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2395
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2396
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2397 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2398 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2399
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2400
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2401 500 Syntax error, command unrecognized.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2402 This may include errors such as command line too long.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2403 501 Syntax error in parameters or arguments.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2404 502 Command not implemented.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2405 503 Bad sequence of commands.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2406 504 Command not implemented for that parameter.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2407 530 Not logged in.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2408 532 Need account for storing files.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2409 550 Requested action not taken.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2410 File unavailable (e.g., file not found, no access).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2411 551 Requested action aborted: page type unknown.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2412 552 Requested file action aborted.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2413 Exceeded storage allocation (for current directory or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2414 dataset).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2415 553 Requested action not taken.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2416 File name not allowed.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2417
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2418
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2419 5. DECLARATIVE SPECIFICATIONS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2420
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2421 5.1. MINIMUM IMPLEMENTATION
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2422
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2423 In order to make FTP workable without needless error messages, the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2424 following minimum implementation is required for all servers:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2425
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2426 TYPE - ASCII Non-print
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2427 MODE - Stream
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2428 STRUCTURE - File, Record
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2429 COMMANDS - USER, QUIT, PORT,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2430 TYPE, MODE, STRU,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2431 for the default values
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2432 RETR, STOR,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2433 NOOP.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2434
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2435 The default values for transfer parameters are:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2436
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2437 TYPE - ASCII Non-print
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2438 MODE - Stream
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2439 STRU - File
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2440
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2441 All hosts must accept the above as the standard defaults.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2442
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2443
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2444
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2445
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2446
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2447
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2448
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2449
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2450 Postel & Reynolds [Page 43]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2451
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2452
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2453
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2454 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2455 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2456
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2457
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2458 5.2. CONNECTIONS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2459
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2460 The server protocol interpreter shall "listen" on Port L. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2461 user or user protocol interpreter shall initiate the full-duplex
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2462 control connection. Server- and user- processes should follow the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2463 conventions of the Telnet protocol as specified in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2464 ARPA-Internet Protocol Handbook [1]. Servers are under no
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2465 obligation to provide for editing of command lines and may require
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2466 that it be done in the user host. The control connection shall be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2467 closed by the server at the user's request after all transfers and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2468 replies are completed.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2469
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2470 The user-DTP must "listen" on the specified data port; this may be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2471 the default user port (U) or a port specified in the PORT command.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2472 The server shall initiate the data connection from his own default
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2473 data port (L-1) using the specified user data port. The direction
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2474 of the transfer and the port used will be determined by the FTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2475 service command.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2476
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2477 Note that all FTP implementation must support data transfer using
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2478 the default port, and that only the USER-PI may initiate the use
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2479 of non-default ports.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2480
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2481 When data is to be transferred between two servers, A and B (refer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2482 to Figure 2), the user-PI, C, sets up control connections with
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2483 both server-PI's. One of the servers, say A, is then sent a PASV
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2484 command telling him to "listen" on his data port rather than
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2485 initiate a connection when he receives a transfer service command.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2486 When the user-PI receives an acknowledgment to the PASV command,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2487 which includes the identity of the host and port being listened
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2488 on, the user-PI then sends A's port, a, to B in a PORT command; a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2489 reply is returned. The user-PI may then send the corresponding
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2490 service commands to A and B. Server B initiates the connection
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2491 and the transfer proceeds. The command-reply sequence is listed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2492 below where the messages are vertically synchronous but
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2493 horizontally asynchronous:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2494
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2495
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2496
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2497
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2498
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2499
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2500
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2501
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2502
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2503
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2504
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2505
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2506
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2507 Postel & Reynolds [Page 44]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2508
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2509
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2510
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2511 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2512 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2513
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2514
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2515 User-PI - Server A User-PI - Server B
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2516 ------------------ ------------------
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2517
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2518 C->A : Connect C->B : Connect
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2519 C->A : PASV
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2520 A->C : 227 Entering Passive Mode. A1,A2,A3,A4,a1,a2
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2521 C->B : PORT A1,A2,A3,A4,a1,a2
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2522 B->C : 200 Okay
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2523 C->A : STOR C->B : RETR
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2524 B->A : Connect to HOST-A, PORT-a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2525
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2526 Figure 3
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2527
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2528 The data connection shall be closed by the server under the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2529 conditions described in the Section on Establishing Data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2530 Connections. If the data connection is to be closed following a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2531 data transfer where closing the connection is not required to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2532 indicate the end-of-file, the server must do so immediately.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2533 Waiting until after a new transfer command is not permitted
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2534 because the user-process will have already tested the data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2535 connection to see if it needs to do a "listen"; (remember that the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2536 user must "listen" on a closed data port BEFORE sending the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2537 transfer request). To prevent a race condition here, the server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2538 sends a reply (226) after closing the data connection (or if the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2539 connection is left open, a "file transfer completed" reply (250)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2540 and the user-PI should wait for one of these replies before
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2541 issuing a new transfer command).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2542
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2543 Any time either the user or server see that the connection is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2544 being closed by the other side, it should promptly read any
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2545 remaining data queued on the connection and issue the close on its
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2546 own side.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2547
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2548 5.3. COMMANDS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2549
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2550 The commands are Telnet character strings transmitted over the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2551 control connections as described in the Section on FTP Commands.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2552 The command functions and semantics are described in the Section
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2553 on Access Control Commands, Transfer Parameter Commands, FTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2554 Service Commands, and Miscellaneous Commands. The command syntax
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2555 is specified here.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2556
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2557 The commands begin with a command code followed by an argument
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2558 field. The command codes are four or fewer alphabetic characters.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2559 Upper and lower case alphabetic characters are to be treated
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2560 identically. Thus, any of the following may represent the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2561 retrieve command:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2562
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2563
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2564 Postel & Reynolds [Page 45]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2565
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2566
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2567
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2568 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2569 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2570
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2571
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2572 RETR Retr retr ReTr rETr
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2573
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2574 This also applies to any symbols representing parameter values,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2575 such as A or a for ASCII TYPE. The command codes and the argument
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2576 fields are separated by one or more spaces.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2577
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2578 The argument field consists of a variable length character string
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2579 ending with the character sequence <CRLF> (Carriage Return, Line
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2580 Feed) for NVT-ASCII representation; for other negotiated languages
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2581 a different end of line character might be used. It should be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2582 noted that the server is to take no action until the end of line
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2583 code is received.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2584
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2585 The syntax is specified below in NVT-ASCII. All characters in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2586 argument field are ASCII characters including any ASCII
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2587 represented decimal integers. Square brackets denote an optional
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2588 argument field. If the option is not taken, the appropriate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2589 default is implied.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2590
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2591
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2592
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2593
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2594
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2595
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2596
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2597
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2598
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2599
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2600
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2601
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2602
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2603
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2604
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2605
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2606
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2607
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2608
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2609
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2610
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2611
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2612
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2613
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2614
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2615
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2616
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2617
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2618
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2619
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2620
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2621 Postel & Reynolds [Page 46]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2622
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2623
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2624
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2625 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2626 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2627
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2628
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2629 5.3.1. FTP COMMANDS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2630
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2631 The following are the FTP commands:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2632
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2633 USER <SP> <username> <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2634 PASS <SP> <password> <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2635 ACCT <SP> <account-information> <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2636 CWD <SP> <pathname> <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2637 CDUP <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2638 SMNT <SP> <pathname> <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2639 QUIT <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2640 REIN <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2641 PORT <SP> <host-port> <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2642 PASV <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2643 TYPE <SP> <type-code> <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2644 STRU <SP> <structure-code> <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2645 MODE <SP> <mode-code> <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2646 RETR <SP> <pathname> <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2647 STOR <SP> <pathname> <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2648 STOU <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2649 APPE <SP> <pathname> <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2650 ALLO <SP> <decimal-integer>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2651 [<SP> R <SP> <decimal-integer>] <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2652 REST <SP> <marker> <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2653 RNFR <SP> <pathname> <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2654 RNTO <SP> <pathname> <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2655 ABOR <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2656 DELE <SP> <pathname> <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2657 RMD <SP> <pathname> <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2658 MKD <SP> <pathname> <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2659 PWD <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2660 LIST [<SP> <pathname>] <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2661 NLST [<SP> <pathname>] <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2662 SITE <SP> <string> <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2663 SYST <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2664 STAT [<SP> <pathname>] <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2665 HELP [<SP> <string>] <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2666 NOOP <CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2667
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2668
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2669
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2670
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2671
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2672
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2673
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2674
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2675
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2676
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2677
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2678 Postel & Reynolds [Page 47]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2679
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2680
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2681
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2682 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2683 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2684
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2685
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2686 5.3.2. FTP COMMAND ARGUMENTS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2687
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2688 The syntax of the above argument fields (using BNF notation
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2689 where applicable) is:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2690
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2691 <username> ::= <string>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2692 <password> ::= <string>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2693 <account-information> ::= <string>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2694 <string> ::= <char> | <char><string>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2695 <char> ::= any of the 128 ASCII characters except <CR> and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2696 <LF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2697 <marker> ::= <pr-string>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2698 <pr-string> ::= <pr-char> | <pr-char><pr-string>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2699 <pr-char> ::= printable characters, any
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2700 ASCII code 33 through 126
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2701 <byte-size> ::= <number>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2702 <host-port> ::= <host-number>,<port-number>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2703 <host-number> ::= <number>,<number>,<number>,<number>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2704 <port-number> ::= <number>,<number>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2705 <number> ::= any decimal integer 1 through 255
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2706 <form-code> ::= N | T | C
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2707 <type-code> ::= A [<sp> <form-code>]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2708 | E [<sp> <form-code>]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2709 | I
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2710 | L <sp> <byte-size>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2711 <structure-code> ::= F | R | P
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2712 <mode-code> ::= S | B | C
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2713 <pathname> ::= <string>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2714 <decimal-integer> ::= any decimal integer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2715
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2716
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2717
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2718
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2719
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2720
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2721
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2722
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2723
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2724
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2725
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2726
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2727
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2728
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2729
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2730
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2731
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2732
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2733
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2734
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2735 Postel & Reynolds [Page 48]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2736
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2737
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2738
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2739 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2740 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2741
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2742
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2743 5.4. SEQUENCING OF COMMANDS AND REPLIES
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2744
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2745 The communication between the user and server is intended to be an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2746 alternating dialogue. As such, the user issues an FTP command and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2747 the server responds with a prompt primary reply. The user should
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2748 wait for this initial primary success or failure response before
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2749 sending further commands.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2750
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2751 Certain commands require a second reply for which the user should
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2752 also wait. These replies may, for example, report on the progress
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2753 or completion of file transfer or the closing of the data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2754 connection. They are secondary replies to file transfer commands.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2755
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2756 One important group of informational replies is the connection
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2757 greetings. Under normal circumstances, a server will send a 220
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2758 reply, "awaiting input", when the connection is completed. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2759 user should wait for this greeting message before sending any
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2760 commands. If the server is unable to accept input right away, a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2761 120 "expected delay" reply should be sent immediately and a 220
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2762 reply when ready. The user will then know not to hang up if there
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2763 is a delay.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2764
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2765 Spontaneous Replies
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2766
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2767 Sometimes "the system" spontaneously has a message to be sent
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2768 to a user (usually all users). For example, "System going down
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2769 in 15 minutes". There is no provision in FTP for such
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2770 spontaneous information to be sent from the server to the user.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2771 It is recommended that such information be queued in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2772 server-PI and delivered to the user-PI in the next reply
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2773 (possibly making it a multi-line reply).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2774
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2775 The table below lists alternative success and failure replies for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2776 each command. These must be strictly adhered to; a server may
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2777 substitute text in the replies, but the meaning and action implied
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2778 by the code numbers and by the specific command reply sequence
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2779 cannot be altered.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2780
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2781 Command-Reply Sequences
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2782
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2783 In this section, the command-reply sequence is presented. Each
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2784 command is listed with its possible replies; command groups are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2785 listed together. Preliminary replies are listed first (with
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2786 their succeeding replies indented and under them), then
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2787 positive and negative completion, and finally intermediary
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2788
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2789
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2790
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2791
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2792 Postel & Reynolds [Page 49]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2793
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2794
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2795
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2796 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2797 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2798
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2799
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2800 replies with the remaining commands from the sequence
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2801 following. This listing forms the basis for the state
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2802 diagrams, which will be presented separately.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2803
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2804 Connection Establishment
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2805 120
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2806 220
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2807 220
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2808 421
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2809 Login
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2810 USER
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2811 230
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2812 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2813 500, 501, 421
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2814 331, 332
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2815 PASS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2816 230
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2817 202
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2818 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2819 500, 501, 503, 421
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2820 332
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2821 ACCT
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2822 230
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2823 202
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2824 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2825 500, 501, 503, 421
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2826 CWD
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2827 250
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2828 500, 501, 502, 421, 530, 550
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2829 CDUP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2830 200
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2831 500, 501, 502, 421, 530, 550
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2832 SMNT
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2833 202, 250
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2834 500, 501, 502, 421, 530, 550
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2835 Logout
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2836 REIN
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2837 120
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2838 220
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2839 220
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2840 421
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2841 500, 502
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2842 QUIT
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2843 221
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2844 500
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2845
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2846
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2847
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2848
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2849 Postel & Reynolds [Page 50]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2850
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2851
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2852
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2853 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2854 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2855
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2856
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2857 Transfer parameters
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2858 PORT
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2859 200
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2860 500, 501, 421, 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2861 PASV
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2862 227
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2863 500, 501, 502, 421, 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2864 MODE
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2865 200
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2866 500, 501, 504, 421, 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2867 TYPE
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2868 200
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2869 500, 501, 504, 421, 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2870 STRU
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2871 200
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2872 500, 501, 504, 421, 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2873 File action commands
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2874 ALLO
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2875 200
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2876 202
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2877 500, 501, 504, 421, 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2878 REST
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2879 500, 501, 502, 421, 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2880 350
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2881 STOR
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2882 125, 150
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2883 (110)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2884 226, 250
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2885 425, 426, 451, 551, 552
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2886 532, 450, 452, 553
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2887 500, 501, 421, 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2888 STOU
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2889 125, 150
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2890 (110)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2891 226, 250
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2892 425, 426, 451, 551, 552
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2893 532, 450, 452, 553
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2894 500, 501, 421, 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2895 RETR
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2896 125, 150
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2897 (110)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2898 226, 250
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2899 425, 426, 451
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2900 450, 550
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2901 500, 501, 421, 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2902
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2903
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2904
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2905
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2906 Postel & Reynolds [Page 51]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2907
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2908
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2909
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2910 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2911 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2912
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2913
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2914 LIST
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2915 125, 150
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2916 226, 250
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2917 425, 426, 451
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2918 450
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2919 500, 501, 502, 421, 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2920 NLST
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2921 125, 150
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2922 226, 250
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2923 425, 426, 451
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2924 450
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2925 500, 501, 502, 421, 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2926 APPE
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2927 125, 150
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2928 (110)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2929 226, 250
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2930 425, 426, 451, 551, 552
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2931 532, 450, 550, 452, 553
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2932 500, 501, 502, 421, 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2933 RNFR
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2934 450, 550
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2935 500, 501, 502, 421, 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2936 350
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2937 RNTO
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2938 250
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2939 532, 553
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2940 500, 501, 502, 503, 421, 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2941 DELE
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2942 250
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2943 450, 550
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2944 500, 501, 502, 421, 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2945 RMD
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2946 250
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2947 500, 501, 502, 421, 530, 550
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2948 MKD
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2949 257
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2950 500, 501, 502, 421, 530, 550
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2951 PWD
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2952 257
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2953 500, 501, 502, 421, 550
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2954 ABOR
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2955 225, 226
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2956 500, 501, 502, 421
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2957
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2958
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2959
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2960
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2961
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2962
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2963 Postel & Reynolds [Page 52]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2964
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2965
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2966
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2967 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2968 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2969
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2970
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2971 Informational commands
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2972 SYST
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2973 215
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2974 500, 501, 502, 421
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2975 STAT
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2976 211, 212, 213
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2977 450
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2978 500, 501, 502, 421, 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2979 HELP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2980 211, 214
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2981 500, 501, 502, 421
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2982 Miscellaneous commands
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2983 SITE
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2984 200
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2985 202
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2986 500, 501, 530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2987 NOOP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2988 200
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2989 500 421
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2990
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2991
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2992
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2993
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2994
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2995
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2996
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2997
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2998
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3000
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3001
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3002
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3003
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3004
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3005
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3006
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3007
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3008
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3009
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3010
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3011
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3012
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3013
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3014
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3015
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3016
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3017
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3018
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3019
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3020 Postel & Reynolds [Page 53]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3021
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3022
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3023
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3024 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3025 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3026
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3027
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3028 6. STATE DIAGRAMS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3029
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3030 Here we present state diagrams for a very simple minded FTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3031 implementation. Only the first digit of the reply codes is used.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3032 There is one state diagram for each group of FTP commands or command
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3033 sequences.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3034
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3035 The command groupings were determined by constructing a model for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3036 each command then collecting together the commands with structurally
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3037 identical models.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3038
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3039 For each command or command sequence there are three possible
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3040 outcomes: success (S), failure (F), and error (E). In the state
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3041 diagrams below we use the symbol B for "begin", and the symbol W for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3042 "wait for reply".
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3043
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3044 We first present the diagram that represents the largest group of FTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3045 commands:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3046
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3047
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3048 1,3 +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3049 ----------->| E |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3050 | +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3051 |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3052 +---+ cmd +---+ 2 +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3053 | B |---------->| W |---------->| S |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3054 +---+ +---+ +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3055 |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3056 | 4,5 +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3057 ----------->| F |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3058 +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3059
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3060
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3061 This diagram models the commands:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3062
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3063 ABOR, ALLO, DELE, CWD, CDUP, SMNT, HELP, MODE, NOOP, PASV,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3064 QUIT, SITE, PORT, SYST, STAT, RMD, MKD, PWD, STRU, and TYPE.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3065
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3066
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3067
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3068
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3069
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3070
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3071
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3072
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3073
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3074
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3075
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3076
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3077 Postel & Reynolds [Page 54]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3078
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3079
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3080
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3081 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3082 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3083
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3084
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3085 The other large group of commands is represented by a very similar
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3086 diagram:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3087
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3088
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3089 3 +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3090 ----------->| E |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3091 | +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3092 |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3093 +---+ cmd +---+ 2 +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3094 | B |---------->| W |---------->| S |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3095 +---+ --->+---+ +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3096 | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3097 | | | 4,5 +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3098 | 1 | ----------->| F |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3099 ----- +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3100
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3101
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3102 This diagram models the commands:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3103
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3104 APPE, LIST, NLST, REIN, RETR, STOR, and STOU.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3105
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3106 Note that this second model could also be used to represent the first
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3107 group of commands, the only difference being that in the first group
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3108 the 100 series replies are unexpected and therefore treated as error,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3109 while the second group expects (some may require) 100 series replies.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3110 Remember that at most, one 100 series reply is allowed per command.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3111
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3112 The remaining diagrams model command sequences, perhaps the simplest
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3113 of these is the rename sequence:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3114
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3115
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3116 +---+ RNFR +---+ 1,2 +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3117 | B |---------->| W |---------->| E |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3118 +---+ +---+ -->+---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3119 | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3120 3 | | 4,5 |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3121 -------------- ------ |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3122 | | | +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3123 | ------------->| S |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3124 | | 1,3 | | +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3125 | 2| --------
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3126 | | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3127 V | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3128 +---+ RNTO +---+ 4,5 ----->+---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3129 | |---------->| W |---------->| F |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3130 +---+ +---+ +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3131
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3132
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3133
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3134 Postel & Reynolds [Page 55]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3135
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3136
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3137
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3138 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3139 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3140
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3141
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3142 The next diagram is a simple model of the Restart command:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3143
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3144
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3145 +---+ REST +---+ 1,2 +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3146 | B |---------->| W |---------->| E |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3147 +---+ +---+ -->+---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3148 | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3149 3 | | 4,5 |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3150 -------------- ------ |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3151 | | | +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3152 | ------------->| S |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3153 | | 3 | | +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3154 | 2| --------
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3155 | | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3156 V | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3157 +---+ cmd +---+ 4,5 ----->+---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3158 | |---------->| W |---------->| F |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3159 +---+ -->+---+ +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3160 | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3161 | 1 |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3162 ------
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3163
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3164
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3165 Where "cmd" is APPE, STOR, or RETR.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3166
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3167 We note that the above three models are similar. The Restart differs
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3168 from the Rename two only in the treatment of 100 series replies at
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3169 the second stage, while the second group expects (some may require)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3170 100 series replies. Remember that at most, one 100 series reply is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3171 allowed per command.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3172
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3173
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3174
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3175
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3176
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3177
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3178
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3179
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3180
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3181
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3182
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3183
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3184
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3185
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3186
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3187
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3188
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3189
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3190
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3191 Postel & Reynolds [Page 56]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3192
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3193
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3194
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3195 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3196 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3197
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3198
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3199 The most complicated diagram is for the Login sequence:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3200
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3201
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3202 1
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3203 +---+ USER +---+------------->+---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3204 | B |---------->| W | 2 ---->| E |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3205 +---+ +---+------ | -->+---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3206 | | | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3207 3 | | 4,5 | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3208 -------------- ----- | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3209 | | | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3210 | | | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3211 | --------- |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3212 | 1| | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3213 V | | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3214 +---+ PASS +---+ 2 | ------>+---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3215 | |---------->| W |------------->| S |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3216 +---+ +---+ ---------->+---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3217 | | | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3218 3 | |4,5| | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3219 -------------- -------- |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3220 | | | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3221 | | | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3222 | -----------
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3223 | 1,3| | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3224 V | 2| | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3225 +---+ ACCT +---+-- | ----->+---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3226 | |---------->| W | 4,5 -------->| F |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3227 +---+ +---+------------->+---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3228
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3229
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3230
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3231
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3232
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3233
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3234
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3235
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3236
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3237
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3238
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3239
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3240
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3241
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3242
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3243
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3244
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3245
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3246
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3247
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3248 Postel & Reynolds [Page 57]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3249
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3250
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3251
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3252 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3253 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3254
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3255
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3256 Finally, we present a generalized diagram that could be used to model
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3257 the command and reply interchange:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3258
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3259
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3260 ------------------------------------
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3261 | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3262 Begin | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3263 | V |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3264 | +---+ cmd +---+ 2 +---+ |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3265 -->| |------->| |---------->| | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3266 | | | W | | S |-----|
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3267 -->| | -->| |----- | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3268 | +---+ | +---+ 4,5 | +---+ |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3269 | | | | | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3270 | | | 1| |3 | +---+ |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3271 | | | | | | | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3272 | | ---- | ---->| F |-----
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3273 | | | | |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3274 | | | +---+
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3275 -------------------
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3276 |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3277 |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3278 V
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3279 End
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3280
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3281
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3282
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3283
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3284
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3285
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3286
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3287
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3288
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3289
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3290
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3291
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3292
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3293
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3294
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3295
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3296
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3297
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3298
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3299
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3300
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3301
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3302
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3303
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3304
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3305 Postel & Reynolds [Page 58]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3306
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3307
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3308
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3309 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3310 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3311
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3312
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3313 7. TYPICAL FTP SCENARIO
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3314
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3315 User at host U wanting to transfer files to/from host S:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3316
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3317 In general, the user will communicate to the server via a mediating
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3318 user-FTP process. The following may be a typical scenario. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3319 user-FTP prompts are shown in parentheses, '---->' represents
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3320 commands from host U to host S, and '<----' represents replies from
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3321 host S to host U.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3322
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3323 LOCAL COMMANDS BY USER ACTION INVOLVED
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3324
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3325 ftp (host) multics<CR> Connect to host S, port L,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3326 establishing control connections.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3327 <---- 220 Service ready <CRLF>.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3328 username Doe <CR> USER Doe<CRLF>---->
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3329 <---- 331 User name ok,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3330 need password<CRLF>.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3331 password mumble <CR> PASS mumble<CRLF>---->
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3332 <---- 230 User logged in<CRLF>.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3333 retrieve (local type) ASCII<CR>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3334 (local pathname) test 1 <CR> User-FTP opens local file in ASCII.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3335 (for. pathname) test.pl1<CR> RETR test.pl1<CRLF> ---->
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3336 <---- 150 File status okay;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3337 about to open data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3338 connection<CRLF>.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3339 Server makes data connection
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3340 to port U.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3341
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3342 <---- 226 Closing data connection,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3343 file transfer successful<CRLF>.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3344 type Image<CR> TYPE I<CRLF> ---->
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3345 <---- 200 Command OK<CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3346 store (local type) image<CR>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3347 (local pathname) file dump<CR> User-FTP opens local file in Image.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3348 (for.pathname) >udd>cn>fd<CR> STOR >udd>cn>fd<CRLF> ---->
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3349 <---- 550 Access denied<CRLF>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3350 terminate QUIT <CRLF> ---->
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3351 Server closes all
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3352 connections.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3353
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3354 8. CONNECTION ESTABLISHMENT
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3355
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3356 The FTP control connection is established via TCP between the user
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3357 process port U and the server process port L. This protocol is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3358 assigned the service port 21 (25 octal), that is L=21.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3359
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3360
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3361
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3362 Postel & Reynolds [Page 59]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3363
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3364
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3365
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3366 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3367 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3368
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3369
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3370 APPENDIX I - PAGE STRUCTURE
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3371
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3372 The need for FTP to support page structure derives principally from
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3373 the need to support efficient transmission of files between TOPS-20
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3374 systems, particularly the files used by NLS.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3375
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3376 The file system of TOPS-20 is based on the concept of pages. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3377 operating system is most efficient at manipulating files as pages.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3378 The operating system provides an interface to the file system so that
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3379 many applications view files as sequential streams of characters.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3380 However, a few applications use the underlying page structures
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3381 directly, and some of these create holey files.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3382
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3383 A TOPS-20 disk file consists of four things: a pathname, a page
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3384 table, a (possibly empty) set of pages, and a set of attributes.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3385
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3386 The pathname is specified in the RETR or STOR command. It includes
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3387 the directory name, file name, file name extension, and generation
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3388 number.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3389
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3390 The page table contains up to 2**18 entries. Each entry may be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3391 EMPTY, or may point to a page. If it is not empty, there are also
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3392 some page-specific access bits; not all pages of a file need have the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3393 same access protection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3394
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3395 A page is a contiguous set of 512 words of 36 bits each.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3396
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3397 The attributes of the file, in the File Descriptor Block (FDB),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3398 contain such things as creation time, write time, read time, writer's
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3399 byte-size, end-of-file pointer, count of reads and writes, backup
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3400 system tape numbers, etc.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3401
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3402 Note that there is NO requirement that entries in the page table be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3403 contiguous. There may be empty page table slots between occupied
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3404 ones. Also, the end of file pointer is simply a number. There is no
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3405 requirement that it in fact point at the "last" datum in the file.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3406 Ordinary sequential I/O calls in TOPS-20 will cause the end of file
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3407 pointer to be left after the last datum written, but other operations
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3408 may cause it not to be so, if a particular programming system so
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3409 requires.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3410
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3411 In fact, in both of these special cases, "holey" files and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3412 end-of-file pointers NOT at the end of the file, occur with NLS data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3413 files.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3414
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3415
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3416
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3417
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3418
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3419 Postel & Reynolds [Page 60]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3420
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3421
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3422
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3423 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3424 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3425
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3426
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3427 The TOPS-20 paged files can be sent with the FTP transfer parameters:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3428 TYPE L 36, STRU P, and MODE S (in fact, any mode could be used).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3429
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3430 Each page of information has a header. Each header field, which is a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3431 logical byte, is a TOPS-20 word, since the TYPE is L 36.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3432
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3433 The header fields are:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3434
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3435 Word 0: Header Length.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3436
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3437 The header length is 5.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3438
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3439 Word 1: Page Index.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3440
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3441 If the data is a disk file page, this is the number of that
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3442 page in the file's page map. Empty pages (holes) in the file
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3443 are simply not sent. Note that a hole is NOT the same as a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3444 page of zeros.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3445
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3446 Word 2: Data Length.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3447
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3448 The number of data words in this page, following the header.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3449 Thus, the total length of the transmission unit is the Header
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3450 Length plus the Data Length.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3451
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3452 Word 3: Page Type.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3453
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3454 A code for what type of chunk this is. A data page is type 3,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3455 the FDB page is type 2.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3456
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3457 Word 4: Page Access Control.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3458
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3459 The access bits associated with the page in the file's page
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3460 map. (This full word quantity is put into AC2 of an SPACS by
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3461 the program reading from net to disk.)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3462
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3463 After the header are Data Length data words. Data Length is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3464 currently either 512 for a data page or 31 for an FDB. Trailing
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3465 zeros in a disk file page may be discarded, making Data Length less
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3466 than 512 in that case.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3467
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3468
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3469
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3470
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3471
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3472
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3473
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3474
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3475
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3476 Postel & Reynolds [Page 61]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3477
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3478
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3479
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3480 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3481 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3482
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3483
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3484 APPENDIX II - DIRECTORY COMMANDS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3485
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3486 Since UNIX has a tree-like directory structure in which directories
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3487 are as easy to manipulate as ordinary files, it is useful to expand
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3488 the FTP servers on these machines to include commands which deal with
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3489 the creation of directories. Since there are other hosts on the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3490 ARPA-Internet which have tree-like directories (including TOPS-20 and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3491 Multics), these commands are as general as possible.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3492
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3493 Four directory commands have been added to FTP:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3494
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3495 MKD pathname
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3496
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3497 Make a directory with the name "pathname".
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3498
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3499 RMD pathname
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3500
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3501 Remove the directory with the name "pathname".
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3502
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3503 PWD
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3504
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3505 Print the current working directory name.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3506
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3507 CDUP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3508
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3509 Change to the parent of the current working directory.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3510
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3511 The "pathname" argument should be created (removed) as a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3512 subdirectory of the current working directory, unless the "pathname"
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3513 string contains sufficient information to specify otherwise to the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3514 server, e.g., "pathname" is an absolute pathname (in UNIX and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3515 Multics), or pathname is something like "<abso.lute.path>" to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3516 TOPS-20.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3517
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3518 REPLY CODES
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3519
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3520 The CDUP command is a special case of CWD, and is included to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3521 simplify the implementation of programs for transferring directory
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3522 trees between operating systems having different syntaxes for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3523 naming the parent directory. The reply codes for CDUP be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3524 identical to the reply codes of CWD.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3525
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3526 The reply codes for RMD be identical to the reply codes for its
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3527 file analogue, DELE.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3528
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3529 The reply codes for MKD, however, are a bit more complicated. A
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3530 freshly created directory will probably be the object of a future
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3531
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3532
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3533 Postel & Reynolds [Page 62]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3534
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3535
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3536
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3537 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3538 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3539
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3540
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3541 CWD command. Unfortunately, the argument to MKD may not always be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3542 a suitable argument for CWD. This is the case, for example, when
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3543 a TOPS-20 subdirectory is created by giving just the subdirectory
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3544 name. That is, with a TOPS-20 server FTP, the command sequence
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3545
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3546 MKD MYDIR
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3547 CWD MYDIR
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3548
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3549 will fail. The new directory may only be referred to by its
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3550 "absolute" name; e.g., if the MKD command above were issued while
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3551 connected to the directory <DFRANKLIN>, the new subdirectory
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3552 could only be referred to by the name <DFRANKLIN.MYDIR>.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3553
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3554 Even on UNIX and Multics, however, the argument given to MKD may
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3555 not be suitable. If it is a "relative" pathname (i.e., a pathname
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3556 which is interpreted relative to the current directory), the user
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3557 would need to be in the same current directory in order to reach
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3558 the subdirectory. Depending on the application, this may be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3559 inconvenient. It is not very robust in any case.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3560
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3561 To solve these problems, upon successful completion of an MKD
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3562 command, the server should return a line of the form:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3563
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3564 257<space>"<directory-name>"<space><commentary>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3565
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3566 That is, the server will tell the user what string to use when
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3567 referring to the created directory. The directory name can
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3568 contain any character; embedded double-quotes should be escaped by
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3569 double-quotes (the "quote-doubling" convention).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3570
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3571 For example, a user connects to the directory /usr/dm, and creates
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3572 a subdirectory, named pathname:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3573
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3574 CWD /usr/dm
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3575 200 directory changed to /usr/dm
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3576 MKD pathname
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3577 257 "/usr/dm/pathname" directory created
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3578
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3579 An example with an embedded double quote:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3580
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3581 MKD foo"bar
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3582 257 "/usr/dm/foo""bar" directory created
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3583 CWD /usr/dm/foo"bar
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3584 200 directory changed to /usr/dm/foo"bar
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3585
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3586
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3587
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3588
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3589
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3590 Postel & Reynolds [Page 63]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3591
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3592
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3593
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3594 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3595 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3596
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3597
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3598 The prior existence of a subdirectory with the same name is an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3599 error, and the server must return an "access denied" error reply
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3600 in that case.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3601
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3602 CWD /usr/dm
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3603 200 directory changed to /usr/dm
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3604 MKD pathname
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3605 521-"/usr/dm/pathname" directory already exists;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3606 521 taking no action.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3607
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3608 The failure replies for MKD are analogous to its file creating
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3609 cousin, STOR. Also, an "access denied" return is given if a file
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3610 name with the same name as the subdirectory will conflict with the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3611 creation of the subdirectory (this is a problem on UNIX, but
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3612 shouldn't be one on TOPS-20).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3613
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3614 Essentially because the PWD command returns the same type of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3615 information as the successful MKD command, the successful PWD
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3616 command uses the 257 reply code as well.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3617
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3618 SUBTLETIES
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3619
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3620 Because these commands will be most useful in transferring
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3621 subtrees from one machine to another, carefully observe that the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3622 argument to MKD is to be interpreted as a sub-directory of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3623 current working directory, unless it contains enough information
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3624 for the destination host to tell otherwise. A hypothetical
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3625 example of its use in the TOPS-20 world:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3626
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3627 CWD <some.where>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3628 200 Working directory changed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3629 MKD overrainbow
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3630 257 "<some.where.overrainbow>" directory created
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3631 CWD overrainbow
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3632 431 No such directory
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3633 CWD <some.where.overrainbow>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3634 200 Working directory changed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3635
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3636 CWD <some.where>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3637 200 Working directory changed to <some.where>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3638 MKD <unambiguous>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3639 257 "<unambiguous>" directory created
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3640 CWD <unambiguous>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3641
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3642 Note that the first example results in a subdirectory of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3643 connected directory. In contrast, the argument in the second
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3644 example contains enough information for TOPS-20 to tell that the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3645
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3646
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3647 Postel & Reynolds [Page 64]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3648
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3649
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3650
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3651 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3652 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3653
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3654
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3655 <unambiguous> directory is a top-level directory. Note also that
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3656 in the first example the user "violated" the protocol by
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3657 attempting to access the freshly created directory with a name
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3658 other than the one returned by TOPS-20. Problems could have
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3659 resulted in this case had there been an <overrainbow> directory;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3660 this is an ambiguity inherent in some TOPS-20 implementations.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3661 Similar considerations apply to the RMD command. The point is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3662 this: except where to do so would violate a host's conventions for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3663 denoting relative versus absolute pathnames, the host should treat
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3664 the operands of the MKD and RMD commands as subdirectories. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3665 257 reply to the MKD command must always contain the absolute
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3666 pathname of the created directory.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3667
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3668
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3669
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3670
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3671
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3672
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3673
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3674
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3675
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3676
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3677
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3678
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3679
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3680
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3681
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3682
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3683
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3684
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3685
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3686
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3687
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3688
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3689
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3690
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3691
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3692
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3693
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3694
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3695
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3696
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3697
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3698
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3699
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3700
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3701
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3702
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3703
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3704 Postel & Reynolds [Page 65]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3705
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3706
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3707
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3708 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3709 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3710
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3711
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3712 APPENDIX III - RFCs on FTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3713
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3714 Bhushan, Abhay, "A File Transfer Protocol", RFC 114 (NIC 5823),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3715 MIT-Project MAC, 16 April 1971.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3716
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3717 Harslem, Eric, and John Heafner, "Comments on RFC 114 (A File
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3718 Transfer Protocol)", RFC 141 (NIC 6726), RAND, 29 April 1971.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3719
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3720 Bhushan, Abhay, et al, "The File Transfer Protocol", RFC 172
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3721 (NIC 6794), MIT-Project MAC, 23 June 1971.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3722
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3723 Braden, Bob, "Comments on DTP and FTP Proposals", RFC 238 (NIC 7663),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3724 UCLA/CCN, 29 September 1971.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3725
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3726 Bhushan, Abhay, et al, "The File Transfer Protocol", RFC 265
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3727 (NIC 7813), MIT-Project MAC, 17 November 1971.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3728
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3729 McKenzie, Alex, "A Suggested Addition to File Transfer Protocol",
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3730 RFC 281 (NIC 8163), BBN, 8 December 1971.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3731
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3732 Bhushan, Abhay, "The Use of "Set Data Type" Transaction in File
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3733 Transfer Protocol", RFC 294 (NIC 8304), MIT-Project MAC,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3734 25 January 1972.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3735
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3736 Bhushan, Abhay, "The File Transfer Protocol", RFC 354 (NIC 10596),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3737 MIT-Project MAC, 8 July 1972.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3738
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3739 Bhushan, Abhay, "Comments on the File Transfer Protocol (RFC 354)",
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3740 RFC 385 (NIC 11357), MIT-Project MAC, 18 August 1972.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3741
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3742 Hicks, Greg, "User FTP Documentation", RFC 412 (NIC 12404), Utah,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3743 27 November 1972.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3744
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3745 Bhushan, Abhay, "File Transfer Protocol (FTP) Status and Further
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3746 Comments", RFC 414 (NIC 12406), MIT-Project MAC, 20 November 1972.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3747
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3748 Braden, Bob, "Comments on File Transfer Protocol", RFC 430
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3749 (NIC 13299), UCLA/CCN, 7 February 1973.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3750
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3751 Thomas, Bob, and Bob Clements, "FTP Server-Server Interaction",
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3752 RFC 438 (NIC 13770), BBN, 15 January 1973.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3753
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3754 Braden, Bob, "Print Files in FTP", RFC 448 (NIC 13299), UCLA/CCN,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3755 27 February 1973.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3756
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3757 McKenzie, Alex, "File Transfer Protocol", RFC 454 (NIC 14333), BBN,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3758 16 February 1973.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3759
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3760
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3761 Postel & Reynolds [Page 66]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3762
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3763
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3764
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3765 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3766 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3767
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3768
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3769 Bressler, Bob, and Bob Thomas, "Mail Retrieval via FTP", RFC 458
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3770 (NIC 14378), BBN-NET and BBN-TENEX, 20 February 1973.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3771
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3772 Neigus, Nancy, "File Transfer Protocol", RFC 542 (NIC 17759), BBN,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3773 12 July 1973.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3774
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3775 Krilanovich, Mark, and George Gregg, "Comments on the File Transfer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3776 Protocol", RFC 607 (NIC 21255), UCSB, 7 January 1974.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3777
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3778 Pogran, Ken, and Nancy Neigus, "Response to RFC 607 - Comments on the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3779 File Transfer Protocol", RFC 614 (NIC 21530), BBN, 28 January 1974.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3780
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3781 Krilanovich, Mark, George Gregg, Wayne Hathaway, and Jim White,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3782 "Comments on the File Transfer Protocol", RFC 624 (NIC 22054), UCSB,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3783 Ames Research Center, SRI-ARC, 28 February 1974.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3784
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3785 Bhushan, Abhay, "FTP Comments and Response to RFC 430", RFC 463
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3786 (NIC 14573), MIT-DMCG, 21 February 1973.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3787
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3788 Braden, Bob, "FTP Data Compression", RFC 468 (NIC 14742), UCLA/CCN,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3789 8 March 1973.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3790
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3791 Bhushan, Abhay, "FTP and Network Mail System", RFC 475 (NIC 14919),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3792 MIT-DMCG, 6 March 1973.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3793
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3794 Bressler, Bob, and Bob Thomas "FTP Server-Server Interaction - II",
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3795 RFC 478 (NIC 14947), BBN-NET and BBN-TENEX, 26 March 1973.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3796
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3797 White, Jim, "Use of FTP by the NIC Journal", RFC 479 (NIC 14948),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3798 SRI-ARC, 8 March 1973.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3799
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3800 White, Jim, "Host-Dependent FTP Parameters", RFC 480 (NIC 14949),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3801 SRI-ARC, 8 March 1973.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3802
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3803 Padlipsky, Mike, "An FTP Command-Naming Problem", RFC 506
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3804 (NIC 16157), MIT-Multics, 26 June 1973.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3805
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3806 Day, John, "Memo to FTP Group (Proposal for File Access Protocol)",
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3807 RFC 520 (NIC 16819), Illinois, 25 June 1973.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3808
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3809 Merryman, Robert, "The UCSD-CC Server-FTP Facility", RFC 532
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3810 (NIC 17451), UCSD-CC, 22 June 1973.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3811
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3812 Braden, Bob, "TENEX FTP Problem", RFC 571 (NIC 18974), UCLA/CCN,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3813 15 November 1973.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3814
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3815
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3816
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3817
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3818 Postel & Reynolds [Page 67]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3819
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3820
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3821
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3822 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3823 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3824
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3825
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3826 McKenzie, Alex, and Jon Postel, "Telnet and FTP Implementation -
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3827 Schedule Change", RFC 593 (NIC 20615), BBN and MITRE,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3828 29 November 1973.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3829
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3830 Sussman, Julie, "FTP Error Code Usage for More Reliable Mail
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3831 Service", RFC 630 (NIC 30237), BBN, 10 April 1974.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3832
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3833 Postel, Jon, "Revised FTP Reply Codes", RFC 640 (NIC 30843),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3834 UCLA/NMC, 5 June 1974.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3835
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3836 Harvey, Brian, "Leaving Well Enough Alone", RFC 686 (NIC 32481),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3837 SU-AI, 10 May 1975.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3838
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3839 Harvey, Brian, "One More Try on the FTP", RFC 691 (NIC 32700), SU-AI,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3840 28 May 1975.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3841
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3842 Lieb, J., "CWD Command of FTP", RFC 697 (NIC 32963), 14 July 1975.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3843
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3844 Harrenstien, Ken, "FTP Extension: XSEN", RFC 737 (NIC 42217), SRI-KL,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3845 31 October 1977.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3846
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3847 Harrenstien, Ken, "FTP Extension: XRSQ/XRCP", RFC 743 (NIC 42758),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3848 SRI-KL, 30 December 1977.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3849
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3850 Lebling, P. David, "Survey of FTP Mail and MLFL", RFC 751, MIT,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3851 10 December 1978.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3852
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3853 Postel, Jon, "File Transfer Protocol Specification", RFC 765, ISI,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3854 June 1980.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3855
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3856 Mankins, David, Dan Franklin, and Buzz Owen, "Directory Oriented FTP
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3857 Commands", RFC 776, BBN, December 1980.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3858
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3859 Padlipsky, Michael, "FTP Unique-Named Store Command", RFC 949, MITRE,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3860 July 1985.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3861
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3862
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3863
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3864
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3865
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3866
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3867
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3868
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3869
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3870
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3871
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3872
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3873
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3874
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3875 Postel & Reynolds [Page 68]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3876
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3877
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3878
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3879 RFC 959 October 1985
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3880 File Transfer Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3881
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3882
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3883 REFERENCES
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3884
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3885 [1] Feinler, Elizabeth, "Internet Protocol Transition Workbook",
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3886 Network Information Center, SRI International, March 1982.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3887
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3888 [2] Postel, Jon, "Transmission Control Protocol - DARPA Internet
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3889 Program Protocol Specification", RFC 793, DARPA, September 1981.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3890
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3891 [3] Postel, Jon, and Joyce Reynolds, "Telnet Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3892 Specification", RFC 854, ISI, May 1983.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3893
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3894 [4] Reynolds, Joyce, and Jon Postel, "Assigned Numbers", RFC 943,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3895 ISI, April 1985.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3896
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3897
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3898
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3899
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3900
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3901
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3902
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3903
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3904
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3905
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3906
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3907
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3908
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3909
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3910
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3911
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3912
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3913
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3914
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3915
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3916
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3917
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3918
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3919
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3920
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3921
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3922
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3923
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3924
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3925
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3926
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3927
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3928
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3929
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3930
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3931
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3932 Postel & Reynolds [Page 69]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3933