INTERNET-DRAFT M. Yevstifeyev Intended Status: Standards Track August 23, 2011 Updates: 959, 1738 (if approved) Expires: February 24, 2012 The 'ftp' URI Scheme draft-yevstifeyev-ftp-uri-scheme-07 Abstract This document specifies the 'ftp' Uniform Resource Identifier (URI) scheme, which is used to refer to resources accessible via File Transfer Protocol (FTP). It updates RFC 959 and RFC 1738. Status of this Memo This Internet-Draft is submitted to IETF in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/1id-abstracts.html The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html Copyright and License Notice Copyright (c) 2011 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as Yevstifeyev Expires February 24, 2012 [Page 1] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology and Conventions . . . . . . . . . . . . . . . . . . 3 2.1. Conformance Criteria . . . . . . . . . . . . . . . . . . . 3 2.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . 3 2.3. Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . 4 2.4. Interpreting Examples . . . . . . . . . . . . . . . . . . . 4 2.5. Miscellaneous Conventions . . . . . . . . . . . . . . . . . 4 3. URI Scheme Specification . . . . . . . . . . . . . . . . . . . 5 3.1. URI Scheme Syntax . . . . . . . . . . . . . . . . . . . . . 5 3.2. URI Scheme Semantics . . . . . . . . . . . . . . . . . . . 6 3.2.1. The and Parts . . . . . . . . . . . . . . 7 3.2.2. The Part . . . . . . . . . . . . . . . . . . 7 3.2.3. The Part . . . . . . . . . . . . . . . . . . 9 3.2.3.1. The Part . . . . . . . . . . . . . 10 3.2.4. Queries and Fragment Identifiers . . . . . . . . . . . 11 3.2.4.1. Queries . . . . . . . . . . . . . . . . . . . . . . 11 3.2.4.2. Fragment Identifiers . . . . . . . . . . . . . . . 11 3.3. Encoding Considerations . . . . . . . . . . . . . . . . . . 12 4. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.1. Examples of 'ftp' IRIs and Internationalized URIs . . . . . 16 5. Security and Privacy Considerations . . . . . . . . . . . . . . 17 6. Internationalization Considerations . . . . . . . . . . . . . . 18 6.1. UCS Characters in 'ftp' URIs . . . . . . . . . . . . . . . 18 6.2. 'ftp' IRIs . . . . . . . . . . . . . . . . . . . . . . . . 18 6.3. Handling 'ftp' URIs with UCS Characters and 'ftp' IRIs . . 19 6.3.1. Internationalized Part in 'ftp' URIs and Part in 'ftp' IRIs . . . . . . . . . . . . . . 19 6.3.2. Internationalized Part in 'ftp' URIs and in 'ftp' IRIs . . . . . . . . . . . . . . . 19 6.4. Internationalization of Actual Data Interchange . . . . . . 20 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 20 7.1. The 'ftp' URI Scheme . . . . . . . . . . . . . . . . . . . 20 7.2. The 'ftps' URI Scheme . . . . . . . . . . . . . . . . . . . 20 7.3. Maintaining ftp.uri.arpa Domain . . . . . . . . . . . . . . 21 7.4. 'd' Data Type Code . . . . . . . . . . . . . . . . . . . . 21 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 21 8.1. Normative References . . . . . . . . . . . . . . . . . . . 21 8.2. Informative References . . . . . . . . . . . . . . . . . . 22 Appendix A. Dynamic Delegation Discovery System (DDDS) and 'ftp' URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Appendix B. Previous Syntax Definitions . . . . . . . . . . . . . 26 B.1. RFC 1630 . . . . . . . . . . . . . . . . . . . . . . . . . 26 B.2. RFC 1738 . . . . . . . . . . . . . . . . . . . . . . . . . 27 Appendix C. List of Changes since RFC 1738 . . . . . . . . . . . . 29 Yevstifeyev Expires February 24, 2012 [Page 2] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 Appendix D. Acknowledgments . . . . . . . . . . . . . . . . . . . 29 Author's Addresses . . . . . . . . . . . . . . . . . . . . . . . . 29 1. Introduction File Transfer Protocol (FTP) is a standard network protocol used to copy a file from one host to another over a TCP-based network. It has had a very long history; the protocol is rooted in the early 1970s, the times of ARPANET, with the first specification being RFC 354 [RFC0354]; the most current FTP specification is RFC 959 [RFC0959]. RFC 1123 [RFC1123] made a number of changes to FTP specification. The 'ftp' Uniform Resource Identifier (URI) scheme, used for referencing resources accessible via FTP, has been deployed. It was first mentioned in RFC 1630 [RFC1630] - pre-Standard Track RFC on URIs. Later, RFC 1738 [RFC1738], Section 3.2 specified this scheme, as well as many others, on IETF Standards Track. This document extracts the definition of the 'ftp' URI scheme from this document to retain it on Standard Track if and when RFC 1738 is moved to Historic status [RFC2026][HISTORIC] as well as makes several changes to suit current scheme usage. (With the first respect it belongs to a series of similar documents like RFC 2368 [RFC2368], which is now obsoleted by RFC 6068 [RFC6068], RFC 4248 [RFC4248], RFC 4266 [RFC4266], and RFC 5538 [RFC5538]; RFC 4156 [RFC4156] and RFC 4157 [RFC4157] also extracted definition of 'wais' and 'prospero' schemes from RFC 1738 but have no relation to Standards Track, since the aforementioned schemes are historical.) It updates RFC 959 and RFC 1738. Generic URI syntax is described in RFC 3986 [RFC3986]; registration procedures for new URI schemes - in RFC 4395 [RFC4395]. 2. Terminology and Conventions 2.1. Conformance Criteria The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119]. 2.2. Terminology In this document, the terms "client" and "server" are used in the meaning of "user-FTP process" and "server-FTP process", respectively, which are defined in Section 2.2 of RFC 959 [RFC0959]. The terms "FTP command" (referred to as "command" within this document), "user- PI", "server-PI", "user-DTP", "server-DTP", "control connection", Yevstifeyev Expires February 24, 2012 [Page 3] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 "data connection", "reply" and "user" are used with the meaning defined in the same document. Section 3.3 makes use of terms described in RFC 3536bis [RFC3536bis]. Terms related to DDDS used in Appendix A, especially those which occur capitalized, are described in RFC 3402 [RFC3402]. IDNA-related terminology is derived from RFC 5890 [RFC5890]. In this document "ASCII" refers to the American Standard Code for Information Interchange, character set defined in ANSI Standard X3.4 [ASCII]; definition of Net-ASCII found in Appendix B of RFC 5198 [RFC5198] may be considered to be equivalent. In this document "EBCIDIC" refers to the Extended Binary Coded Decimal Interchange Code, a proprietary character set of IBM Corporation defined at and doubled in RFC 183 [RFC0183]. 2.3. Formal Syntax This document uses the Augmented Backus-Naur Form (ABNF) [RFC5234] for description of formal syntax. The , , , , and rules are imported from RFC 3986 [RFC3986] and rule - from RFC 5234 [RFC5234]. 2.4. Interpreting Examples In the examples of FTP dialogs presented in this document, lines that begin "C> " were sent over the control connection from the user-PI to the server-PI, and lines that begin "S> " were sent over the control connection from the server-PI to the user-PI. In all cases, the prefixes shown above, including the one space, have been added for the purposes of this document, and are not a part of the data exchanged between client and server. Within such dialogs text enclosed in angle brackets ("<" and ">", ASCII characters 0x3C and 0x3E, respectively), unless clearly mentioned in such dialog, is not an actual part of FTP exchange but rather describes actions taken by parties of exchange or provides general comment. 2.5. Miscellaneous Conventions The construction "ASCII character 0xHH", where "HH" represents 2 hexadecimal digits, is equivalent to RFC 20 [RFC0020] construction "ASCII X'HH'" and denotes ASCII character which has been assigned the ASCII code HH. For example, ASCII character 0x5E refers to the "^" (caret) and ASCII character 0x7B refers to "{" (left curly bracket). The constructions described in Sections 3 and 4 of RFC 5137 [RFC5137] Yevstifeyev Expires February 24, 2012 [Page 4] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 are used in this document to point and escape Unicode characters, respectively. 3. URI Scheme Specification 3.1. URI Scheme Syntax The syntax of 'ftp' URI is described in rule below. ftp-uri = "ftp:" ftp-hier-part ftp-hier-part = "//" [ userinfo "@" ] host [ ":" port ] [ ftp-path ] userinfo = user [ ":" pass ] user = 1*usp-char pass = *usp-char usp-char = unreserved / pct-encoded / sub-delims ftp-path = [ cwd-part ] "/" last-segment [ typecode-part ] cwd-part = *( "/" cwd ) cwd = segment-nsc last-segment = segment-nsc segment-nsc = *pchar-nsc pchar-nsc = unreserved / pct-encoded / sub-delims-nsc / ":" / "@" sub-delims-nsc = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / / "," / "=" ; RFC 3986 excluding semicolon (";") ; character (ASCII character 0x3B) typecode-part = ";type=" typecode typecode = "a" / "e" / "i" / "u" / "d" / typecode-ext typecode-ext = ALPHA RFC 3986 deprecated the use of "user:pass" format of the part of URIs. However, for some historical reasons, the benefits of the use of such construction for denoting the user information in the 'ftp' URIs are valuable enough to overlook this issue; see Section 3.2.2 of this document. When is present, it should be noted that is always present, too; it may be null, though. For instance, the URIs and have null s while has the equal to "big.xls". At strict syntactical level, may be defined as follows: ftp-path =/ *( "/" cwd ) [ typecode-part ] Yevstifeyev Expires February 24, 2012 [Page 5] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 However, for the purpose of better understanding the algorithm of its handling given in Section 3.2.3, the definition found in the beginning of this section is used. Please note that while processing the 'ftp' URI those characters which appear percent-encoded, MUST be decoded for the purpose of handling the URI, including the actual FTP exchange; see Section 3.3 for more information. The semantics of each part are defined in Section 3.2. 3.2. URI Scheme Semantics The 'ftp' URI specifies a resource (a file or a directory listing) on the definite FTP server. The application resolving the 'ftp' URI SHALL use the following algorithm: (1) establish the Transmission Control Protocol (TCP) [RFC0793] connection to the server identified by the on the port identified by the (or 21, if not supplied in the 'ftp' URI); (2) perform an attempt to identify the host it is trying to access using the HOST command [I-D ietf-ftpext2-hosts], as described in Section 3.2.1; (3) authenticate itself to the server; (4) request a list of supported features from server using FEAT command [RFC2389]; if feature negotiation mechanism is not supported by the server, act if the FEAT command has not been sent (this step is RECOMMENDED but not required); and (5) perform a series of commands according to part. Please note that the client MAY also perform other steps during this algorithm, such as requesting the server information using SYST command [RFC0959] or select a language of interchange using LANG command [RFC2640]. However, performing the steps of this algorithm is REQUIRED, modulo step 4, which is RECOMMENDED. Handling error replies received during processing the URI, unless clearly stated in this document, is implementation-specific. Since 'ftp' URI does not denote the transmission mode which is to be used, the stream mode, which is described in Section 3.4.1 of RFC 959 Yevstifeyev Expires February 24, 2012 [Page 6] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 [RFC0959], MUST always be used. 'ftp' URIs cannot be used for other operations, such as uploading or removing a file on a server. Note: The 'ftp' URI scheme supports FTP over TCP only; such derivations as FTP over User Datagram Protocol (UDP) [RFC0768] or Stream Control Transmission Protocol (SCTP) [RFC4960], as known to be deployed, are not supported by it. Note: The 'ftp' and the 'file' URI are not the same, even though they both may refer to the resource on the local host. More detailed description of each URI's parts' semantics is below. 3.2.1. The and Parts The part, which is required, specifies the server which a connection is to be established to. The part, which is optional, denotes the TCP port for establishing such connection. If the part with the preceding colon (":") character (ASCII character 0x3A) is omitted, the port SHALL default to 21, as registered in [IANA-PORTREG]. Upon establishing a successful TCP connection, the client MUST first try to identify the host it is trying to access using the HOST command [I-D ietf-ftpext2-hosts]. It is performed by sending this command with the part of the URI as an argument. If either 500 or 502 reply is received in response (which identify that the HOST command is unrecognized or unimplemented, respectively), the client SHALL act as if a HOST command had not been sent and continue processing the URI. If either 501 or 504 reply is received (which identify that the supplied hostname is syntactically invalid or it is unavailable, respectively), the client's behavior depends on how does the server react. If, in accordance with Section 3.3 of RFC nnnn [I-D ietf-ftpext2-hosts], the server chooses to terminate the connection, the client SHALL notify the user and take no further actions. Otherwise, if the server does not terminate the connection, the client SHALL act as if a HOST command had not been sent and continue processing the URI. 3.2.2. The Part The part, which is optional, consists of the and the parts. The part, which is required within , denotes the user name; the part, which is optional Yevstifeyev Expires February 24, 2012 [Page 7] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 within , - the password. The user name and the password are delimited by the colon (":") character (ASCII character 0x3A). There are three cases of handling the part. The first implies that the 'ftp' URI provides entire user credentials (a user name and a password). In this case, upon establishing successful TCP connection to the server specified in the URI the client SHALL use supplied user name with the USER command; if the server requests the password via sending the 331 reply, one supplied in the URI MUST first be used. The second case covers the situation when the only user name is supplied. Under such circumstances, the client SHALL first use it in the USER command; if the server requests the password via sending the 331 reply, the client MUST either find applicable password to use in USER command (e.g. request one from the user) or fail by terminating the connection with QUIT command. The third case is when the whole part is omitted in the URI. In this case upon establishing the connection the "anonymous FTP" [RFC1635] SHALL first be used; it implies use of the following credentials: (1) the user name "anonymous", and (2) the password "guest" or that which is an email address [RFC5322]. Note: Current FTP implementations mostly pay no attention to the password supplied with the "anonymous" user name. Thus clients SHOULD NOT supply real email addresses, due to the security reasons, but SHOULD rather supply either randomly-generated or non- existing email addresses under such circumstances. See also Section 5. (For instance, Mozilla Firefox sends the email address "mozilla@example.com" under such circumstances.) However, the authentication which implies use of part of the URI might be unsuccessful (ie. the server might fail to authenticate the user), which is indicated by receiving the 530 reply in response to either USER or PASS command. In this case, the client MUST either find applicable credentials to authenticate itself or fail by terminating the connection with QUIT command. If the former if chosen, and the server does not accept the credentials, the loop is repeated. The 'ftp' URI does not provide a way to denote account information, used with ACCT command. Thus, if the server requests it for authentication (via sending 332 reply to a successful PASS command) or it is required for performing other command (which is denoted by Yevstifeyev Expires February 24, 2012 [Page 8] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 either 332 or 532 server reply received upon sending such command), handling of a URI SHALL be suspended, and the client MUST either find applicable account information to use with ACCT command or fail by terminating the connection with QUIT command. If the former if chosen, and the server does not accept the supplied token, the loop is repeated. The part is not intended to define information which should be used if the authentication is performed using the AUTH command or other mechanism spelled out in RFC 2228 [RFC2228]; see Section 5 of this document. 3.2.3. The Part The part, which is optional, denotes the resource (a file or a directory listing) on the server specified by . For better understanding the algorithm below, the ABNF definition of is copied here: ftp-path = [ cwd-part ] "/" last-segment [ typecode-part ] cwd-part = *( "/" cwd ) cwd = segment-nsc last-segment = segment-nsc segment-nsc = typecode-part = ";type=" typecode typecode = "a" / "e" / "i" / "u" / "d" / typecode-ext typecode-ext = ALPHA Please note that when is omitted, for the purpose of processing the URI it MUST be considered to be "/" and SHOULD be changed to "/" when normalizing the URI. The part SHALL be processed using the following algorithm: (1) if the is present, each of parts are consistently supplied as arguments to the CWD (change working directory) FTP command; Note: Any null parts, allowed per aforementioned syntax, MUST NOT cause sending CWD commands, since they might be erroneously interpreted by some FTP servers. (2) if the is present and is either "a", "e", "i" or "u", perform the TYPE command with the as an argument; (3) whatever the path is, arrange the data connection to the server using an appropriate method, as per those facilities of server Yevstifeyev Expires February 24, 2012 [Page 9] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 discovered with FEAT command [RFC2389] (eg. PORT, PASV [RFC0959], EPRT or EPSV [RFC2428] command; using LPRT and LPSV [RFC1639] commands, which were designated as historical by RFC 5797 [RFC5797], is strongly discouraged); (4a) if is null (whatever is), retrieve the listing of current directory using appropriate method, as per those facilities of server discovered with FEAT command [RFC2389] (eg. LIST, NLST [RFC0959] or MLSD [RFC3659] command); Note: If and are omitted and is null, refers to the default directory on the for the logged user; in this case directory listings are to be retrieved directly after establishing data connection, skipping steps (1) and (2) above. (4b) if the is present and the is equal to "d", specifies the directory; in this case retrieve listing of the directory specified by (or the current directory, if is null) using the appropriate method (see above); (4c) in the case described in (2) refers to a file; retrieve this file using appropriate method (using RETR command is RECOMMENDED); (4d) otherwise, may refer either to a file or a directory listing; perform both subsequent attempts to access the file and a directory listing; order of such attempts is non- substantial. Note: Some client may involve additional heuristic algorithms to determine what does the refer to, such as checking its format to see whether is matches the "." format. This document allows them to do in such way. Please note that the client MAY also perform other steps during this algorithm, such as retrieving file size using SIZE command or modification time using MSTM command [RFC3659]. However, performing the steps of this algorithm is REQUIRED. Handling error replies caused by processing the is implementation-specific. 3.2.3.1. The Part The part specifies the data type of and the parameter of FTP TYPE command to be applied to such data. Yevstifeyev Expires February 24, 2012 [Page 10] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 Refer to Section 1.3 of [I-D ietf-ftpext2-typeu] for discussion of TYPE history. Currently, there are five options of : "a", "e", "i", which are specified in RFC 959 and stand for ASCII, EBCDIC text, "raw" (binary) data, "u", which is specified in RFC mmmm [I-D ietf-ftpext2- typeu] and stands for Net-Unicode [RFC5198] text, and "d", which is not an actual typecode but rather a "pseudo-typecode" to identify that the is a directory. (The 'd' TYPE parameter is hereby reserved; see Section 7.4.) The production provides a possibility to accommodate new typecodes in the 'ftp' URI. Therefore, when a new FTP data type is defined, its specification MUST define its relationship with the 'ftp' URI. When the refers to the type code which is not yet defined, the client SHOULD ignore it. (For instance, the 'xtp' FTP TYPE parameter was eventually proposed [RFC0683] during early stages of FTP development. Currently, hardly somebody knows about the existence of this data type parameter; also, it is not a valid and the URI like is to be treated as .) 3.2.4. Queries and Fragment Identifiers 3.2.4.1. Queries This document does not specify the query component to be used in 'ftp' URIs. Clients SHOULD ignore it, if present. Correspondingly, any question mark ("?") characters (ASCII character 0x3F), as they are not allowed within URIs for any reason other that denoting the query component by RFC 3986, MUST be percent-encoded within 'ftp' URIs. 3.2.4.2. Fragment Identifiers According to RFC 3986, the specification of a definite URI scheme must not define the fragment identifiers in the corresponding scheme syntax, as they depend on the media type of a resource identified by such URI. Correspondingly, fragment identifier are allowed in any URI. The number sign ("#") characters (ASCII character 0x23), if used for the reason other than to delimit the fragment identifier SHALL be percent-encoded. If present in 'ftp' URI, fragment identifier is put after the (and , if present), forming an URI like . Handling the fragment Yevstifeyev Expires February 24, 2012 [Page 11] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 identifier is solely up to the client. See Section 4 for an example of an URI with fragment identifier. 3.3. Encoding Considerations The parts of 'ftp' URIs may contain characters from ASCII character set which are allowed in the corresponding parts. Those characters which are excluded from the allowed characters for a particular part SHALL be encoded within this part. 'ftp' URIs MAY contain characters from Universal Character Set (UCS) [UCS] in and part, as discussed in Section 6. Further internationalization of 'ftp' URIs is discussed ibidem. As mentioned before, the characters in ASCII range which appear percent-encoded in the URI, MUST be decoded in the actual FTP exchange. This means that when sending data over FTP control connection per Section 3.2 of this document percent-encoded characters SHALL be replaced with their ASCII equivalents. However, those percent-encoded octets which are outside of ASCII range SHALL be transmitted as the corresponding octets. For instance, "%2F", if occurs in the , will be replaced with "/", ASCII character 0x2F, and "%E7", if occurs ibidem, will be transmitted as octet when sending as an argument to CWD command. 4. Examples This section provides several examples of 'ftp' URIs and their valid handling per this document. Within it, DNS names reserved by RFC 2606 [RFC2606] and IPv4 addresses reserved by RFC 5737 [RFC5737] are used. The URI may result in the following data exchange: S> 220 ExampleFTP Server ready C> HOST example.com S> 220 Host accepted C> USER anonymous S> 331 Anonymous permitted; supply email as password C> PASS bad-guy@example.com S> 230 Logged in C> CWD /somedir Yevstifeyev Expires February 24, 2012 [Page 12] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 S> 250 Directory changed C> PASV S> 227 Entering Passive Mode (192,0,2,12,52,453) C> NLST seconddir S> 150 Here comes the directory listing S> 226 Directory listing sent The URI may result in the following data exchange: S> 220 CoolFTP Server Ready C> HOST 203.0.113.42 S> 220 Host OK C> USER fellow S> 331 Specify password C> PASS bad-guy S> 230 Congrats! Logged in C> CWD /etc S> 250 Directory changed C> PASV S> 227 Passive entered (203,0,113,42,61,853) is a directory to the client's mind> C> LIST motd S> 550 No such directory refers to a file> C> RETR motd S> 150 Transfer starts... S> 226 File is sent Such URI is different from one with equal to "/etc/motd" or "//etc/motd", since both such URI will result in sending "CWD etc" instead of . The following example illustrates the situation when supplied credentials are invalid. Thus, the URI may result in the following: Yevstifeyev Expires February 24, 2012 [Page 13] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 S> 220 GigaSoft FTP - welcome C> HOST example.net S> 220 Why not :-) C> USER user1 S> 331 Mention password C> PASS invalid-pass S> 530 Invalid credentials C> USER right-user S> 331 Mention password C> PASS right-pass S> 230 right-user is a cool guy C> FEAT S> 211-Here the listing comes S> AUTH TLS S> TYPE a;u S> MLST S> 211 End C> PASV S> 227 Passive opened on (198,51,100,41,55,623) C> MLSD S> 150 Here comes the directory listing S> 226 Directory listing sent The following URI contains percent-encoded "?" and "#" characters and fragment identifier to illustrate their valid handling. The URI: may result in the following data exchange: S> 220 Hello C> HOST example.org S> 220 OK C> USER anonymous S> 230 No pass required C> CWD ?foo S> 250 Directory changed C> CWD #bar S> 250 Directory changed C> TYPE a S> 200 Accepted Yevstifeyev Expires February 24, 2012 [Page 14] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 C> PORT 198,51,100,2,65,123 S> 200 Accepted refers to a file to the client's mind> C> RETR file.txt S> 150 Start transmission S> 226 File sent The last example illustrates the complicated URI where a number of issues should be considered. Such issues include the server refusing to accept host name with HOST command, invalid user credentials, inability to support the "u" TYPE parameter and the absence of "bad- file.doc". The URI: may result in the following data interchange: S> 220 Yevstifeyev FTP ready C> HOST example.org S> 504 Unknown host C> USER oh-no S> 331 Supply password C> PASS some-pass S> 530 Invalid credentials C> USER cool-man S> 331 Supply password C> PASS cool-pass S> 230 Authenticated C> CWD foo S> 250 foo is an active directory C> CWD bar S> 250 foo/bar is an active directory C> CWD foobar S> 250 foo/bar/foobar is an active directory C> TYPE u S> 504 U TYPE not supported Yevstifeyev Expires February 24, 2012 [Page 15] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 C> PORT 192,0,2,14,64,695 S> 200 Accepted C> RETR bad-file.doc S> 550 No such file :-( 4.1. Examples of 'ftp' IRIs and Internationalized URIs This section provides several examples of handling 'ftp' IRIs and internationalized URIs, as defined in Section 6. The IRI, which contains U+2603 SNOWMAN character in the as one of s and U+0109 LATIN SMALL LETTER C WITH CIRCUMFLEX character in the , may result in the following data exchange: in the IRI> S> 200 Hi, man! C> HOST xn--at-0la.example.com S> 220 That's OK. C> USER anonymous S> 331 Supply password C> PASS foo@example.org S> 230 Logged in C> FEAT S> 211-Features listing goes now S> MLST S> UTF8 S> NAT6 S> 211 End C> CWD weather S> 250 Working directory changed C> CWD " is a sequence of octets represented hexadecimally, not a sequence of characters> S> 250 Working directory changed C> PORT 198,51,100,20,49,562 S> 200 Data connection aranged C> RETR snow.txt S> 150 Start transmission S> 226 File sent The following example illustrates 'ftp' URI with UCS characters, Yevstifeyev Expires February 24, 2012 [Page 16] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 explicitly, the U+0125 LATIN SMALL LETTER H WITH CIURCUMFLEX in the and U+1D120 MUSICAL SYMBOL G CLEF OTTAVA BASSA in one of s. The URI: in the URI, which contains UCS character> S> 200 Welcome C> HOST xn--ost-4sa.example.com S> 220 Accepted C> USER anonymous S> 230 No pass required C> FEAT S> 211-Listing comes here S> LANG EN* S> TYPE a;e;u S> UTF8 S> REST STREAM S> MLST S> 211 End C> CWD music S> 250 Directory changed C> " is a sequence of octets represented in hexadecimally, not a sequence of characters> S> 250 Directory changed C> PASV S> 227 Entering passive (203,0,113,16,52,458) C> RETR clef.pdf S> 150 Start transmission S> 226 File sent 5. Security and Privacy Considerations Generic security considerations for URIs are discussed in Section 7 of RFC 3986 [RFC3986]; for IRIs - in Section 8 of RFC 3987 [RFC3987]. Security considerations for FTP are addressed in RFC 2577 [RFC2577]. RFC 2228 [RFC2228] and RFC 4217 [RFC4217] provided several ways for securing FTP. However, the 'ftp' URI does not allow to denote whether any of these ways should be used. The 'ftps' URI scheme, which denotes the resource available via FTP secured as defined in RFC 4217, is known to be deployed; this document provisionally registers this scheme with IANA (see Section 6.2), but specifying it is out of the scope of this document. Yevstifeyev Expires February 24, 2012 [Page 17] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 Because of some security concerns RFC 3986 did deprecate the use of "user:pass" format of , as stated in Section 3.1; it only applies to 'ftp' URIs because of historical reasons. Obviously, those URIs which contain the password "in the clear" should be kept and transmitted securely (for example, using Transport Layer Security (TLS) [RFC5246]). The "anonymous FTP" [RFC1635] has a number of security implications, too. When transmitting the email address as a password, if it is required by the server, there is a risk of email address harvesting by intermediary systems, a.k.a. "middle-boxes" (man-in-the-middle attacks) and the ultimate server. As servers usually do not pay attention to such passwords, clients are encouraged to transmit email addresses which are either randomly-generated or non-existing, as doubled in Section 3.2.2. Security considerations for usage of Internationalized Domain Names are discussed in RFC 5890 [RFC5890]. 6. Internationalization Considerations This document discusses internationalization of 'ftp' URIs, as required by RFC 2277 [RFC2277]. 6.1. UCS Characters in 'ftp' URIs As allowed by Section 2.5 of RFC 3986, 'ftp' URIs may contain the characters from Universal Character Set (UCS) [UCS]. They are only allowed in and part; is not internationalized. In order to use such character in one of these parts, it SHALL first be encoded with UTF-8 [RFC3629]. The resulting sequence of octets SHALL be examined to conclude whether some octets match corresponding ASCII characters. If one does, and such character is allowed in a particular part of 'ftp' URI, it SHALL be presented in the URI directly; otherwise, the octet SHALL be represented percent-encoded. (In fact, such situation will only arise when the analyzed character is ASCII character itself, as UCS includes ASCII range.) 6.2. 'ftp' IRIs IRIs, described in RFC 3987 [RFC3987], may contain UCS characters "in the raw", unlike URIs, which only allow ones which are outside of ASCII range percent-encoded (see Section 4.1 above). Correspondingly, the syntax of 'ftp' IRIs will be different from URIs' one. Yevstifeyev Expires February 24, 2012 [Page 18] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 The changes required in URI syntax to match valid IRI is to change of RFC 3986 to of RFC 3987 and of RFC 3986 - to of RFC 3987 in . The is not internationalized. 'ftp' IRIs are subject to the rules of Section 3.1 of RFC 3987 with respect to their mapping to 'ftp' URIs. 6.3. Handling 'ftp' URIs with UCS Characters and 'ftp' IRIs Handling of ftp' URIs with UCS characters and 'ftp' IRIs is mostly the same as discussed in Section 3.2 of this document; however, a number of issues should be considered. 6.3.1. Internationalized Part in 'ftp' URIs and Part in 'ftp' IRIs The part in 'ftp' URIs and part in 'ftp' IRIs may contain internationalized strings, with UCS characters being percent- encoded and displayed directly, respectively. As Domain Name System (DNS) does not allow the UTF-8 encoded data in its interchange, limiting the allowed characters range to ASCII [ASCII], the usual procedure of UTF-8 transformation is insufficient here. Hence, in order to make up the valid domain name for lookup and further processing the algorithm for IDN lookup defined in Section 5 of RFC 5891 [RFC5891] SHALL be applied. The received sequence of dot-separated A-labels SHALL also be used with FTP HOST command [I-D ietf-ftpext2-hosts], sent when establishing FTP connection per Section 3.2.1. 6.3.2. Internationalized Part in 'ftp' URIs and in 'ftp' IRIs The and parts allow to include UCS characters in FTP pathnames present in URIs and IRIs, respectively. In order to successfully process an internationalized FTP pathname, a client prior to its processing SHALL examine the server's response to the FEAT command [RFC2389], issued upon authentication per Section 3.2. If one of the lines of the response is "UTF8", the server supports UTF-8 encoded pathnames [RFC2640]. Otherwise, if there is no such line, or the server does not support the FEAT mechanism, the contrary SHALL be assumed. Should it be determined that server supports UTF-8 encoded pathnames, the internationalized pathname parts SHALL be encoded with UTF-8 Yevstifeyev Expires February 24, 2012 [Page 19] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 [RFC3629] and then transmitted as an arguments to the corresponding FTP commands as UTF-8 octets stream. 6.4. Internationalization of Actual Data Interchange 'ftp' RIs may refer to the file which contains the internationalized data. When transmitting such file over data connection, it should be in Net-Unicode format [RFC5198]. In order to indicate this, the equal to "u" [I-D ietf-ftpext2-typeu] SHALL be set in the 'ftp' URI or IRI. 7. IANA Considerations 7.1. The 'ftp' URI Scheme IANA is asked to update the registration of the 'ftp' URI scheme in the appropriate registry [IANA-URIREG] with the reference to this document using the following template, per [RFC4395]: URI scheme name: ftp Status: Permanent URI scheme syntax: see Section 3.1 of RFC xxxx URI scheme semantics: see Section 3.2 of RFC xxxx URI scheme encoding considerations: see Section 3.3 of RFC xxxx Protocols that use the scheme: File Transfer Protocol (FTP) [RFC0959] Security considerations: see Section 6 of RFC xxxx Contact: IESG Author/Change controller: IETF References: see Section 8 of RFC xxxx [RFC Editor: Please replace xxxx with assigned RFC number] 7.2. The 'ftps' URI Scheme IANA is requested to provisionally register the 'ftps' URI scheme per RFC 4395 [RFC4395] with reference for this document. Specifying this scheme is out of the scope of this document; therefore the registration template is not supplied. As required by Section 4 of Yevstifeyev Expires February 24, 2012 [Page 20] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 RFC 4395, the change controller for the registration is IETF ; contact party is IESG . 7.3. Maintaining ftp.uri.arpa Domain As primarily requested by [MSG-REG] per RFC 3405 [RFC3405], IANA will continue maintaining the ftp.uri.arpa domain for use of DDDS with 'ftp' URIs (see Appendix A). Moreover, IANA is requested to change the existing substitution expression in the NAPTR record for this domain as described in Appendix A. 7.4. 'd' Data Type Code IANA is asked to list the 'd' FTP data type code in the corresponding sub-registry established by RFC oooo [I-D ietf-ftpext2-typeu] as "Reserved for use in 'ftp' URIs" with reference to this document. 8. References 8.1. Normative References [ASCII] American National Standards Institute (ANSI), "Coded Character Set -- 7-bit American Standard Code for Information Interchange", ANSI X3.4-1986, December 1986. ANSI X3.4-1968 has been replaced by newer versions with slight modifications, but the 1968 version remains definitive for the Internet. [I-D ietf-ftpext2-hosts] Hethmon, P., and R. McMurray, "File Transfer Protocol HOST Command for Virtual Hosts", Work in Progress (draft-ietf- ftpext2-hosts), February 2011. [I-D ietf-ftpext2-typeu] Klensin, J., "FTP TYPE Extension for Internationalized Text", Work in Progress (draft-ietf-ftpext2-typeu), June 2011. [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, September 1981. [RFC0959] Postel, J. and J. Reynolds, "File Transfer Protocol", STD 9, RFC 959, October 1985. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. Yevstifeyev Expires February 24, 2012 [Page 21] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 [RFC2389] Hethmon, P. and R. Elz, "Feature negotiation mechanism for the File Transfer Protocol", RFC 2389, August 1998. [RFC3404] Mealling, M., "Dynamic Delegation Discovery System (DDDS) Part Four: The Uniform Resource Identifiers (URI)", RFC 3404, October 2002. [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, November 2003. [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005. [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource Identifiers (IRIs)", RFC 3987, January 2005. [RFC5234] Crocker, D., Ed., and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, January 2008. [RFC5891] Klensin, J., "Internationalized Domain Names in Applications (IDNA): Protocol", RFC 5891, August 2010. 8.2. Informative References [IANA-PORTREG] Internet Assigned Numbers Authority (IANA), "Port Numbers", IANA Registry, . [IANA-URIREG] Internet Assigned Numbers Authority (IANA), "Uniform Resource Identifier (URI) Schemes", IANA Registry, . [HISTORIC] The IESG, "IESG Statement on Designating RFCs as Historic", IESG Statement, June 2011, . [MSG-REG] Cotton, M., "Registration of the 'ftp' URI scheme in uri.arpa under the key ftp.uri.arpa.", Mailing List Posting, January 2003, [RFC0020] Cerf, V., "ASCII format for network interchange", RFC 20, October 1969. Yevstifeyev Expires February 24, 2012 [Page 22] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 [RFC0183] Winett, J., "EBCDIC Codes and Their Mapping to ASCII", RFC 183, July 1971. [RFC0354] Bhushan, A., "File Transfer Protocol", RFC 354, July 1972. [RFC0683] Clements, R., "FTPSRV - Tenex extension for paged files", RFC 683, April 1975. [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, August 1980. [RFC0822] Crocker, D., "STANDARD FOR THE FORMAT OF ARPA INTERNET TEXT MESSAGES", STD 11, RFC 822, August 1982. [RFC1123] Braden, R., Ed., "Requirements for Internet Hosts - Application and Support", STD 3, RFC 1123, October 1989. [RFC1630] Berners-Lee, T., "Universal Resource Identifiers in WWW: A Unifying Syntax for the Expression of Names and Addresses of Objects on the Network as used in the World-Wide Web", RFC 1630, June 1994. [RFC1635] Deutsch, P., Emtage, A., and A. Marine, "How to Use Anonymous FTP", FYI 24, RFC 1635, May 1994. [RFC1639] Piscitello, D., "FTP Operation Over Big Address Records (FOOBAR)", RFC 1639, June 1994. [RFC1738] Berners-Lee, T., Masinter, L., and M. McCahill, "Uniform Resource Locators (URL)", RFC 1738, December 1994. [RFC2026] Bradner, S., "The Internet Standards Process -- Revision 3", BCP 9, RFC 2026, October 1996. [RFC2228] Horowitz, M. and S. Lunt, "FTP Security Extensions", RFC 2228, October 1997. [RFC2277] Alvestrand, H., "IETF Policy on Character Sets and Languages", BCP 18, RFC 2277, January 1998. [RFC2428] Allman, M., Ostermann, S., and C. Metz, "FTP Extensions for IPv6 and NATs", RFC 2428, September 1998. [RFC2368] Hoffman, P., Masinter, L., and J. Zawinski, "The mailto URL scheme", RFC 2368, July 1998. [RFC2577] Allman, M. and S. Ostermann, "FTP Security Considerations", RFC 2577, May 1999. Yevstifeyev Expires February 24, 2012 [Page 23] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 [RFC2606] Eastlake 3rd, D. and A. Panitz, "Reserved Top Level DNS Names", BCP 32, RFC 2606, June 1999. [RFC2640] Curtin, B., "Internationalization of the File Transfer Protocol", RFC 2640, July 1999. [RFC3172] Huston, G., Ed., "Management Guidelines & Operational Requirements for the Address and Routing Parameter Area Domain ("arpa")", BCP 52, RFC 3172, September 2001. [RFC3401] Mealling, M., "Dynamic Delegation Discovery System (DDDS) Part One: The Comprehensive DDDS", RFC 3401, October 2002. [RFC3402] Mealling, M., "Dynamic Delegation Discovery System (DDDS) Part Two: The Algorithm", RFC 3402, October 2002. [RFC3403] Mealling, M., "Dynamic Delegation Discovery System (DDDS) Part Three: The Domain Name System (DNS) Database", RFC 3403, October 2002. [RFC3405] Mealling, M., "Dynamic Delegation Discovery System (DDDS) Part Five: URI.ARPA Assignment Procedures", BCP 65, RFC 3405, October 2002. [RFC3659] Hethmon, P., "Extensions to FTP", RFC 3659, March 2007. [RFC4156] Hoffman, P., "The wais URI Scheme", RFC 4156, August 2005. [RFC4157] Hoffman, P., "The prospero URI Scheme", RFC 4157, August 2005. [RFC4248] Hoffman, P., "The telnet URI Scheme", RFC 4248, October 2005. [RFC4266] Hoffman, P., "The gopher URI Scheme", RFC 4266, November 2005. [RFC4217] Ford-Hutchinson, P., "Securing FTP with TLS", RFC 4217, October 2005. [RFC4395] Hansen, T., Hardie, T., and L. Masinter, "Guidelines and Registration Procedures for New URI Schemes", BCP 35, RFC 4395, February 2006. [RFC4960] Stewart, R., Ed., "Stream Control Transmission Protocol", RFC 4960, September 2007. [RFC5137] Klensin, J., "ASCII Escaping of Unicode Characters", Yevstifeyev Expires February 24, 2012 [Page 24] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 BCP 137, RFC 5137, February 2008. [RFC5147] Wilde, E. and M. Duerst, "URI Fragment Identifiers for the text/plain Media Type", RFC 5147, April 2008. [RFC5198] Klensin, J. and M. Padlipsky, "Unicode Format for Network Interchange", RFC 5198, March 2008. [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, August 2008. [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, October 2008. [RFC5538] Ellermann, F., "The 'news' and 'nntp' URI Schemes", RFC 5538, April 2010. [RFC5737] Arkko, J., Cotton, M., and L. Vegoda, "IPv4 Address Blocks Reserved for Documentation", RFC 5737, January 2010. [RFC5797] Klensin, J. and A. Hoenes, "FTP Command and Extension Registry", RFC 5797, March 2010. [RFC5890] Klensin, J., "Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework", RFC 5890, August 2010. [RFC6068] Duerst, M., Masinter, L., and J. Zawinski, "The 'mailto' URI Scheme", RFC 6068, October 2010. [RFC3536bis] Hoffman, P., and J. Klensin, "Terminology Used in Internationalization in the IETF", Work in Progress (draft-ietf-appsawg-rfc3536bis), June 2011. [UCS] International Organization for Standardization (ISO), "Information technology -- Universal Coded Character Set (UCS)", ISO/IEC 10646:2011, March 2011. Appendix A. Dynamic Delegation Discovery System (DDDS) and 'ftp' URIs Dynamic Delegation Discovery System (DDDS) is an abstract algorithm for applying dynamically retrieved string transformation rules to an application-unique string. The comprehensive DDDS specification consists of 5 documents, which are defined in RFC 3401 [RFC3401]. RFC 3404 [RFC3404] specified a DDDS Application for resolving URIs using DDDS Algorithm defined in RFC 3402 [RFC3402]. A corresponding Yevstifeyev Expires February 24, 2012 [Page 25] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 second-level domain has been delegated in the "arpa" zone [RFC3172] - "uri.arpa" [RFC3405] - for use with this Application. RFC 3404 specified that First Well Known Rule for the aforementioned DDDS Application is to append the URI scheme name to ".uri.arpa". According to the provisions of RFC 3405 [RFC3405], the 'ftp' URI scheme was previously approved for inclusion in this zone [MSG-REG] in order to allow its resolving using DDDS. Correspondingly, the following substitution expression was recorded in the NAPTR DNS resource record [RFC3403]: !^ftp://([^:/?#]*).*$!\1!i using the syntax defined in Section 3.2 of RFC 3402. However, taking the syntax specified in this document into account, IANA is asked to record the following new substitution expression in the NAPTR record for ftp.uri.arpa domain: !^ftp://([^@/?#]*@)?([^:/?#]*).*$!\2!i This substitution expression extracts the hostname from a given URI, skipping the , and forming the next Key. Refer to RFC 3404 for detailed description of DDDS Application for resolving URIs and RFC 3402 for generic DDDS Algorithm. Please note that while there is a possibility to resolve 'ftp' URIs using DDDS, not every given 'ftp' URI may be resolved using this technique. A specific "hint" is required in order to denote this; for instance, "the URI refers to the very valuable information; it is mirrored at a number of servers which are to be discovered using DDDS". Appendix B. Previous Syntax Definitions This appendix copies the definition of the syntax of 'ftp' URI from previous documents which specified it, which might be of some historical interest. Within this appendix, BNF refers to the convention described in Section 2 of RFC 822 [RFC0822]. B.1. RFC 1630 RFC 1630 [RFC1630] defined the syntax of 'ftp' URI with the following conventions: This is a BNF-like description of the URI syntax. at the level at which specific schemes are not considered. A vertical line "|" indicates alternatives, and [brackets] indicate optional parts. Spaces are represented by the word "space", and Yevstifeyev Expires February 24, 2012 [Page 26] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 the vertical line character by "vline". Single letters stand for single letters. All words of more than one letter below are entities described somewhere in this description. as follows: ftpaddress f t p : / / login / path [ ftptype ] login [ user [ : password ] @ ] hostport user alphanum2 [ user ] password alphanum2 [ password ] hostport host [ : port ] host hostname | hostnumber hostname ialpha [ . hostname ] hostnumber digits . digits . digits . digits path void | segment [ / path ] segment xpalphas void ftptype A formcode | E formcode | I | L digits formcode N | T | C alphanum2 alpha | digit | - | _ | . | + alpha a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z digit 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 ialpha alpha [ xalphas ] xalphas xalpha [ xalphas ] xalpha alpha | digit | safe | extra | escape safe $ | - | _ | @ | . | & | + | - extra ! | * | " | ' | ( | ) | , escape % hex hex hex digit | a | b | c | d | e | f | A | B | C | D | E | F digits digit [ digits ] B.2. RFC 1738 RFC 1738, which was the first Standard Track specification for many URI schemes, defined the syntax of 'ftp' URIs with the following conventions: Yevstifeyev Expires February 24, 2012 [Page 27] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 This is a BNF-like description of the Uniform Resource Locator syntax, using the conventions of RFC822, except that "|" is used to designate alternatives, and brackets [] are used around optional or repeated elements. Briefly, literals are quoted with "", optional elements are enclosed in [brackets], and elements may be preceded with * to designate n or more repetitions of the following element; n defaults to 0. as follows: ftpurl = "ftp://" login [ "/" fpath [ ";type=" ftptype ]] login = [ user [ ":" password ] "@" ] hostport hostport = host [ ":" port ] host = hostname | hostnumber hostname = *[ domainlabel "." ] toplabel domainlabel = alphadigit | alphadigit *[ alphadigit | "-" ] alphadigit toplabel = alpha | alpha *[ alphadigit | "-" ] alphadigit hostnumber = digits "." digits "." digits "." digits port = digits user = *[ uchar | ";" | "?" | "&" | "=" ] password = *[ uchar | ";" | "?" | "&" | "=" ] urlpath = *xchar fpath = fsegment *[ "/" fsegment ] fsegment = *[ uchar | "?" | ":" | "@" | "&" | "=" ] ftptype = "A" | "I" | "D" | "a" | "i" | "d" alphadigit = alpha | digit alpha = lowalpha | hialpha lowalpha = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" hialpha = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" digits = 1*digit uchar = unreserved | escape unreserved = alpha | digit | safe | extra safe = "$" | "-" | "_" | "." | "+" extra = "!" | "*" | "'" | "(" | ")" | "," escape = "%" hex hex Yevstifeyev Expires February 24, 2012 [Page 28] INTERNET DRAFT The 'ftp' URI Scheme August 23, 2011 hex = digit | "A" | "B" | "C" | "D" | "E" | "F" | "a" | "b" | "c" | "d" | "e" | "f" xchar = unreserved | reserved | escape reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" Appendix C. List of Changes since RFC 1738 The first specification of the 'ftp' URI is RFC 1738. This appendix lists main changes since that document. Updated syntax specification to use ABNF. Specification changed to suit RFC 3986. Changes made to accommodate HOST command [I-D ietf-ftpext2-hosts]. Given more detailed description of semantics. Clarified the syntax. Given detailed algorithm of handling . Clarified client's handling null s in . Added internationalization considerations. Clarified encoding considerations. Clarified security considerations. Added provisions regarding DDDS. Appendix D. Acknowledgments The authors of RFC 1630 and RFC 1738, who worked on the initial 'ftp' URI scheme definition, included Tim Berners-Lee, Larry Masinter and Mark McCahill. Previous attempts to specify this URI scheme were undertaken by James Casey and Paul Hoffman. Considerable input to this document was provided by (in alphabetical order) John Cowan, Frank Ellermann, John Klensin, Gordon Spoelhof, and Daniel Stenberg. Author's Addresses Mykyta Yevstifeyev 8 Kuzovkov St., Apt. 25 Kotovsk Ukraine EMail: evnikita2@gmail.com Yevstifeyev Expires February 24, 2012 [Page 29]