FTPD(1M) Series 300 Only FTPD(1M)
NAME
ftpd - DARPA Internet File Transfer Protocol server
SYNOPSIS
/etc/ftpd [ -ttimeout ]
HP-UX COMPATIBILITY
Level: HP-UX/NON-STANDARD
Origin: UCB
Remarks: Implemented on the Series 300 only.
DESCRIPTION
Ftpd is the DARPA Internet File Transfer Prototocol server.
It expects to be run by the Internet daemon; see inetd(1M)
and inetd.conf(5). Inetd runs ftpd when a service request
is received at the port indicated in the ``ftp'' service
specification in /etc/services; see services(5).
By default, ftpd times-out an inactive session after 60
seconds. The -t option sets the inactivity timeout period
to timeout seconds.
Ftpd currently supports the following commands (case is not
distinguished):
Command Description
APPE append to a file
CWD change working directory
DELE delete a file
HELP give help information
LIST give list files in a directory (``ls -lg'')
MODE specify data transfer mode
NLST give 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
XMKD make a directory
XPWD print the current working directory
XRMD remove a directory
Hewlett-Packard - 1 - (printed 7/16/86)
FTPD(1M) Series 300 Only FTPD(1M)
Ftpd accepts the remaining FTP requests but takes no action.
Ftpd interprets file names according to the ``globbing''
conventions used by csh(1). This allows users to utilize
the metacharacters ``*?[]{}~''.
Ftpd authenticates users according to three rules:
1) The user account name must not appear in the file
/etc/ftpusers (see ftpusers(5)).
2) The user account name must be in the password data base,
/etc/passwd, and must not have a null password. In this
case the user must provide a valid password before
performing any file operations.
3) If the user account name is ``anonymous'' or ``ftp'', an
anonymous ftp account must be present in /etc/passwd. In
this case the user can log in with any password (by
convention the client host's name).
In the last case, ftpd takes special measures to restrict
the user's access privileges. It performs a chroot(2) to
the home directory of the ftp user. The ``ftp'' subtree
must be constructed carefully, in order to maintain system
security:
$HOME/ftp Make the home directory owned by ``ftp''
and unwritable by anyone.
$HOME/ftp/bin Make this directory owned by root and
unwritable by anyone. The program ls(1)
must be present to support the list
commands. This program should be mode
111.
$HOME/ftp/etc Make this directory owned by root and
unwritable by anyone. The files
passwd(5) and group(5) must be present
for the ls command to work properly.
These files should be mode 444.
$HOME/ftp/pub Make this directory mode 777 and owned
by ``ftp''. Users should then place
files which are to be accessible via the
anonymous account in this directory.
SEE ALSO
ftp(1), inetd(1M), inetd.conf(5).
DIAGNOSTICS
Ftpd replies to FTP commands to ensure synchronization of
Hewlett-Packard - 2 - (printed 7/16/86)
FTPD(1M) Series 300 Only FTPD(1M)
requests and actions during file transfers, and to indicate
the status of ftpd. Every command produces at least one
reply, although there may be more than one. A reply
consists of a three-digit number, a space, some text, and an
end of line. The number is useful for programs; the text is
useful for humans. The number must conform to this
standard, but the text can vary. The first digit indicates
whether the reply is good, bad, or incomplete. The second
digit indicates approximately what sort of error has
occurred. The third digit indicates the most specific error
type.
The File Transfer Protocol defines server replies as
follows. Note that ftpd's replies match the number but not
the text.
110 Restart marker reply. MARK yyyy = mmmm where yyyy is a
user process data stream marker, and mmmm is ftpd's
equivalent marker
119 Terminal not available, will try mailbox
120 Service ready in nnn minutes
125 Data connection already open; transfer starting
150 File status okay; about to open data connection
151 User not local; will forward to <user>@<host>
152 User unknown; mail will be forwarded by the operator
200 Command okay
202 Command not implemented, superfluous at this site
211 System status, or system help reply
212 Directory status
213 File status
214 Help message
215 <scheme> is the preferred scheme
220 Service ready for new user
221 Service closing TELNET connection (logged out if
appropriate)
225 Data connection open; no transfer in progress
226 Closing data connection; requested file action
successful
227 Entering Passive Mode
230 User logged in, proceed
250 Requested file action okay, completed
331 User name okay, need password
332 Need account for login
350 Requested file action pending further information
354 Start mail input; end with <CR><LF>.<CR><LF>
421 Service not available; closing TELNET connection. This
may be a reply to any command if ftpd knows that it
must shut down
425 Can't open data connection
426 Connection closed; transfer aborted
450 Requested file action not taken; file unavailable or
busy
Hewlett-Packard - 3 - (printed 7/16/86)
FTPD(1M) Series 300 Only FTPD(1M)
451 Requested action aborted; local error in processing
452 Requested action not taken; insufficient storage space
in system
500 Syntax error, command unrecognized or command line too
long
501 Syntax error in parameters or arguments
502 Command not implemented
503 Bad sequence of commands
504 Command not implemented for that parameter
530 Not logged in
532 Need account for storing files
550 Requested action not taken; file unavailable, not
found, no access
551 Requested action aborted; page type unknown
552 Requested file action aborted; exceeded storage
allocation for current directory or dataset
553 Requested action not taken; file name not allowed
WARNINGS
The anonymous account is inherently dangerous to system
security and should be avoided.
Hewlett-Packard - 4 - (printed 7/16/86)