ftpd(1M) ftpd(1M)
NAME
ftpd - DARPA Internet File Transfer Protocol server
SYNOPSIS
/etc/ftpd [-d] [-l] [-ttimeout]
DESCRIPTION
ftpd is the DARPA Internet File Transfer Protocol server
process. The server uses the TCP protocol and listens at the
port specified in the ftp service specification; see
services(4N).
-d create each socket with debugging turned on (SO_DEBUG).
This allows the system to trace all TCP packets sent
and received on a socket. You may then use trpt(1M) to
interpret the packet traces.
-l log each ftp session on the standard output. This
allows you to use a line of the form /etc/ftpd -l >
/tmp/ftplog to conveniently maintain a log of ftp
sessions.
-ttimeout
timeout an inactive session after timeout seconds. The
default is 60 seconds.
ftpd currently supports the following ftp requests; case is
not distinguished.
Request Description
ACCT specify account (ignored)
ALLO allocate storage (vacuously)
APPE append to a file
CWD change working directory
DELE delete a file
HELP give help information
LIST list files in a directory (ls -lg)
MODE specify data transfer mode
NLST name list of files in directory (ls)
NOOP do nothing
PASS specify password
PORT specify data connection port
QUIT terminate session
RETR retrieve a file
RNFR specify rename from file name
RNTO specify rename to file name
STOR store a file
STRU specify data transfer structure
TYPE specify data transfer type
USER specify user name
XCUP change to parent of current working directory
XCWD change working directory
Page 1 (last mod. 1/15/87)
ftpd(1M) ftpd(1M)
XMKD make a directory
XPWD print the current working directory
XRMD remove a directory
The remaining ftp requests specified in Internet RFC 765 are
recognized but not implemented.
ftpd interprets file names according to the ``globbing''
conventions used by csh(1). This allows you to use the
metacharacters * ? [ ] { } ~.
ftpd authenticates users according to three rules.
1. The user name must be in the password data base,
/etc/passwd, and not have a null password. The client
must provide a password before performing any file
operations.
2. The user name must not appear in the file /etc/ftpusers.
3. If the user name is anonymousorftp, there must be an
anonymous ftp account in the password file (user ftp).
The user is allowed to log in by specifying any password
(by convention this is given as the client host's name).
ftpd takes special measures to restrict the client's
access privileges. It performs a chroot(2) to the home
directory of the ``ftp'' user. To assure system
security, we recommended that you construct the ``ftp''
subtree according to the following rules:
~ftp This home directory should be owned by ``ftp''
and unwritable by anyone.
~ftp/bin This directory should be owned by the super-
user and unwritable by anyone. ls(1) must be
present to support the list commands and should
have mode 111.
~ftp/etc This directory should be owned by the super-
user and unwritable by anyone. The files
passwd(4) and group(4) must be present for the
ls command to work properly. These files should
be mode 444.
~ftp/pub This directory should be mode 777 and owned by
ftp. Files which are to be accessible via the
anonymous account should be placed in this
directory.
FILES
/etc/ftpd
Page 2 (last mod. 1/15/87)
ftpd(1M) ftpd(1M)
SEE ALSO
ftp(1N).
BUGS
There is no support for aborting commands.
The anonymous account is inherently dangerous and you should
avoid it when possible.
The server must run as the super-user to create sockets with
privileged port numbers. It maintains an effective user ID
of the logged-in user, reverting to the super-user only when
binding addresses to sockets. The possible security holes
have been extensively scrutinized, but are possibly
incomplete.
Page 3 (last mod. 1/15/87)