FTP

The ftp: prefix indicates a file which is to be picked up from the file system of the given host. The FTP protocol is used, As defined in RFC957 or any suceesor. The port number if given gives the port of the FTP server if not the FTP default. (A client may in practice use local file access to retrieve objects which are available though more efficient means such as local file open or NFS mounting, where this is available and equivalent).

The syntax allows for the inclusion of a user name and even a password for those systems which do not use the anonymous FTP convention. The default, however, if no user or password is supplied, will be to use that convention, viz. that the user name is "anonymous" and the password the user's internet-style mail address.

The FTP protocol allows for a sequence of CWD commands (change working directory prior to a RETR which actually accesses a file. The arguments of any CD commands are successive segment parts of the URL, and the filename argument to the RETR command is the final segment of the URL path.

Note

In the case in which the file system of the server is known or guessed, the path may possibly converted into a filename. This may allow the file to be retrieved in one command. In the case of unix, the filename will look the same as the path. This must NOT be taken to indicate that the URL is a unix filename. In practice, as many FTP servers in fact have or emulate unix file systems, it may in fact be time-efficient to attempt first a direct retrieval guessing unix syntax, and, if that fails, to attempt the official sequence of succession of directory changes followed by a RETR command.

There is no common hierarchical model to the FTP protocol, so if a directory change command has been given, it is impossible in general to deduce what sequence should be given to navigate to another directory for a second retrieval, if the paths are different. The only reliable algorithm is to disconnect and reestablish the control connection. However, if no directory changes have been made, but direct retrieval has been done, then the control

(This note previously read: "The adoption of a unix-style syntax involves the conversion into non-unix local forms by either the client or server. Some non-unix servers do this, but clients wishing to access sites which do not have unix-style naming will need certain algorithms to enable other file systems to be identified and treated. Client software may also have to be flexible in terms of the sequence of FTP commands used with different varieties of server. In view of a tendency for file systems to look increasingly similar, it was felt that the URL convention should not be weighed down by extra mechanisms for identifying these cases." )

Note

The data format of a file can only, in the general FTP case, be deduced from the name, normally the suffix of the name. This is not standardized. An alternative is for it to be transferred in information outside the URL. The transfer mode (binary or text) must in turn be deduced from the data format. It is recommended that conventions for suffixes of public archives be established, but it outside the scope of this paper.