ftpd(1M) ftpd(1M)NAME ftpd, in.ftpd - provide Internet File Transfer Protocol (FTP) service SYNOPSIS ftpd [-d] [-l] [-ttimeout] ARGUMENTS -d Causes ftpd to write debugging information to the standard output. -l Causes ftpd to log each ftp session on the standard error output. -ttimeout Specifies in seconds the amount of time to wait before disconnecting an inactive ftp login session. The default is 900 seconds (15 minutes). DESCRIPTION ftpd is the DARPA Internet File Transfer Protocol server for requests from ftp login sessions. The server is started by inetd each time an ftp login session begins. The server uses the Transmission Control Protocol (TCP) and listens at the port specified in the FTP service specification. See services(4N) for details. The ftpd server currently supports the following ftp requests, for which case is not distinguished: ABOR Aborts the previous command. ACCT Specifies an account (ignored). ALLO Allocates storage. APPE Appends to a file. CDUP Changes directory to the parent of current working directory. CWD Changes working directory. DELE Deletes a file. HELP Gives help information. LIST Lists files in a directory; this request is equivalent to ls -lg. MKD Makes a directory. January 1992 1
ftpd(1M) ftpd(1M)MODE Specifies the data-transfer mode. NLST Lists the names of files in directory; this request is equivalent to ls. NOOP Does nothing. PASS Specifies a password. PASV Prepares for server-to-server transfer. PORT Specifies the data connection port. PWD Returns the current working directory. QUIT Terminates the session. RETR Retrieves a file. RMD Removes a directory. RNFR Specifies the current filename to be renamed. RNTO Specifies the new filename for the renamed file. STOR Stores a file. STOU Stores a file with a unique name. STRU Specifies the data for transfer structure. TYPE Specifies the data for transfer type. USER Specifies the login name. XCUP Changes to the parent of current working directory. XCWD Changes working directory. XMKD Makes a directory. XPWD Returns the current working directory. XRMD Removes a directory. The remaining requests specified in Internet RFC 959 are recognized, but are not implemented. The ftpd server aborts an active file transfer only when the ABOR command is preceded by a telnet Interrupt Process (IP) signal and a telnet Synch signal in the command telnet stream, as described in Internet RFC 959. 2 January 1992
ftpd(1M) ftpd(1M)The ftpd server interprets filenames according to the filename expansion conventions used by the C shell. This convention allows users to utilize the following metacharacters: * ? [ ] { } ~ The ftpd server uses three rules to authenticate the login name provided by a user: ⊕ The login name must be in /etc/passwd and must have a password. If this criterion is met, ftpd examines the shell field of the entry in /etc/passwd. If the shell field is /bin/sh, /bin/csh, or empty, the login is allowed. If the shell field contains the name of any other shell, such as /bin/ksh, the file /etc/shells must contain the specified name or the authentication fails. ⊕ The login name provided by the user must not appear in the file /etc/ftpusers. ⊕ If the login name provided by the user is anonymous or ftp, there must be an entry for ftp in the /etc/passwd file. When a user provides anonymous or ftp as a login name, ftpd accepts any password, but, by convention, the password given is the client's host name. This kind of ftp login session is called ``anonymous'' ftp. If you elect to support anonymous ftp, add an entry to the /etc/passwd file for ftp so that the user ID is 8 and the home directory is /usr/spool/ftp. To prevent security breaches, ftpd performs a chroot system call to restrict the client's access privileges to the home directory of ftp. The standard A/UX distribution includes the directory /usr/spool/ftp with the following hierarchy, ownership, and permissions: ~ftp This directory is owned by ftp and is unwritable by anyone. ~ftp/bin This directory is owned by root and is unwritable by anyone. A copy of the ls command is present to support the ftp list commands. This copy is owned by root and is mode 711. ~ftp/etc This directory is owned by root and is unwritable by anyone. The files passwd and group are present so that the ls command works properly. These files are mode 444. January 1992 3
ftpd(1M) ftpd(1M)~ftp/pub This directory is owned by ftp and is mode 777. Users can place files; these files are then accessible to anyone logging in anonymously. LIMITATIONS Anonymous ftp is inherently dangerous and should be avoided when possible. The ftpd server must be owned by root to create sockets with privileged port numbers. It maintains the effective user ID of the logged-in user, reverting to running as root only when binding addresses to sockets. The possible security holes have been extensively scrutinized. SEE ALSO inetd(1M) ftp(1N) in A/UX Command Reference chroot(2) in A/UX Programmer's Reference 4 January 1992