remove restart, etc on branch
[unix-history] / usr / src / libexec / ftpd / ftpd.8
CommitLineData
fdb56acd 1.\" Copyright (c) 1985, 1988 The Regents of the University of California.
43c671de 2.\" All rights reserved.
917eb9fe 3.\"
43c671de
KB
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
917eb9fe 15.\"
fdb56acd 16.\" @(#)ftpd.8 6.7 (Berkeley) %G%
43c671de 17.\"
fdb56acd 18.TH FTPD 8 "February 23, 1989"
917eb9fe
KM
19.UC 5
20.SH NAME
21ftpd \- DARPA Internet File Transfer Protocol server
22.SH SYNOPSIS
23.B /etc/ftpd
24[
25.B \-d
26] [
27.B \-l
28] [
29.BR \-t timeout
fdb56acd
MK
30] [
31.BR \-T maxtimeout
917eb9fe
KM
32]
33.SH DESCRIPTION
34.I Ftpd
fdb56acd 35is the DARPA Internet File Transfer Protocol
917eb9fe
KM
36server process. The server uses the TCP protocol
37and listens at the port specified in the ``ftp''
38service specification; see
39.IR services (5).
40.PP
41If the
42.B \-d
43option is specified,
2c32d7db 44debugging information is written to the syslog.
917eb9fe
KM
45.PP
46If the
47.B \-l
48option is specified,
2c32d7db 49each ftp session is logged in the syslog.
917eb9fe
KM
50.PP
51The ftp server
2c32d7db 52will timeout an inactive session after 15 minutes.
917eb9fe
KM
53If the
54.B \-t
55option is specified,
56the inactivity timeout period will be set to
fdb56acd
MK
57.I timeout
58seconds.
59A client may also request a different timeout period;
60the maximum period allowed may be set to
61.I timeout
62seconds with the
63.B \-T
64option.
65The default limit is 2 hours.
917eb9fe
KM
66.PP
67The ftp server currently supports the following ftp
fdb56acd 68requests; case is not distinguished.
917eb9fe
KM
69.PP
70.nf
71.ta \w'Request 'u
72\fBRequest Description\fP
1bd029de 73ABOR abort previous command
917eb9fe
KM
74ACCT specify account (ignored)
75ALLO allocate storage (vacuously)
76APPE append to a file
1bd029de 77CDUP change to parent of current working directory
917eb9fe
KM
78CWD change working directory
79DELE delete a file
80HELP give help information
fdb56acd 81LIST give list files in a directory (``ls -lgA'')
1bd029de 82MKD make a directory
fdb56acd 83MDTM show last modification time of file
917eb9fe 84MODE specify data transfer \fImode\fP
fdb56acd 85NLST give name list of files in directory
917eb9fe
KM
86NOOP do nothing
87PASS specify password
1bd029de 88PASV prepare for server-to-server transfer
917eb9fe 89PORT specify data connection port
1bd029de 90PWD print the current working directory
917eb9fe 91QUIT terminate session
fdb56acd 92REST restart incomplete transfer
917eb9fe 93RETR retrieve a file
1bd029de 94RMD remove a directory
917eb9fe
KM
95RNFR specify rename-from file name
96RNTO specify rename-to file name
fdb56acd
MK
97SITE non-standard commands (see next section)
98SIZE return size of file
99STAT return status of server
917eb9fe 100STOR store a file
1bd029de 101STOU store a file with a unique name
917eb9fe 102STRU specify data transfer \fIstructure\fP
843d1a1c 103SYST show operating system type of server system
917eb9fe
KM
104TYPE specify data transfer \fItype\fP
105USER specify user name
fdb56acd
MK
106XCUP change to parent of current working directory (deprecated)
107XCWD change working directory (deprecated)
108XMKD make a directory (deprecated)
109XPWD print the current working directory (deprecated)
110XRMD remove a directory (deprecated)
111.fi
112.PP
113The following non-standard or UNIX specific commands are supported
114by the SITE request.
115.PP
116.nf
117.ta \w'Request 'u
118\fBRequest Description\fP
119UMASK change umask. \fIE.g.\fP SITE UMASK 002
120IDLE set idle-timer. \fIE.g.\fP SITE IDLE 60
121CHMOD change mode of a file. \fIE.g.\fP SITE CHMOD 755 filename
122HELP give help information. \fIE.g.\fP SITE HELP
917eb9fe
KM
123.fi
124.PP
1bd029de 125The remaining ftp requests specified in Internet RFC 959 are
917eb9fe 126recognized, but not implemented.
fdb56acd
MK
127MDTM and SIZE are not specified in
128RFC 959, but will appear in the next updated FTP RFC.
917eb9fe 129.PP
1bd029de
GM
130The ftp server will abort an active file transfer only when the
131ABOR command is preceded by a Telnet "Interrupt Process" (IP)
132signal and a Telnet "Synch" signal in the command Telnet stream,
133as described in Internet RFC 959.
fdb56acd
MK
134If a STAT command is received during a data transfer, preceded by a Telnet IP
135and Synch, transfer status will be returned.
1bd029de 136.PP
917eb9fe
KM
137.I Ftpd
138interprets file names according to the ``globbing''
139conventions used by
140.IR csh (1).
141This allows users to utilize the metacharacters ``*?[]{}~''.
142.PP
143.I Ftpd
144authenticates users according to three rules.
145.IP 1)
146The user name must be in the password data base,
147.IR /etc/passwd ,
148and not have a null password. In this case a password
149must be provided by the client before any file operations
150may be performed.
151.IP 2)
152The user name must not appear in the file
153.IR /etc/ftpusers .
154.IP 3)
06e77c11
KM
155The user must have a standard shell returned by
156.IR getusershell (3).
157.IP 4)
917eb9fe
KM
158If the user name is ``anonymous'' or ``ftp'', an
159anonymous ftp account must be present in the password
160file (user ``ftp''). In this case the user is allowed
161to log in by specifying any password (by convention this
162is given as the client host's name).
163.PP
164In the last case,
165.I ftpd
166takes special measures to restrict the client's access privileges.
167The server performs a
168.IR chroot (2)
169command to the home directory of the ``ftp'' user.
170In order that system security is not breached, it is recommended
171that the ``ftp'' subtree be constructed with care; the following
172rules are recommended.
173.IP ~ftp)
174Make the home directory owned by ``ftp'' and unwritable by anyone.
175.IP ~ftp/bin)
176Make this directory owned by the super-user and unwritable by
177anyone. The program
178.IR ls (1)
fdb56acd 179must be present to support the list command. This
917eb9fe
KM
180program should have mode 111.
181.IP ~ftp/etc)
182Make this directory owned by the super-user and unwritable by
183anyone. The files
184.IR passwd (5)
185and
186.IR group (5)
187must be present for the
188.I ls
fdb56acd
MK
189command to be able to produce owner names rather than numbers.
190The password field in
191.I passwd
192is not used, and should not contain real encrypted passwords.
193These files should be mode 444.
917eb9fe
KM
194.IP ~ftp/pub)
195Make this directory mode 777 and owned by ``ftp''. Users
196should then place files which are to be accessible via the
197anonymous account in this directory.
198.SH "SEE ALSO"
43c671de 199ftp(1), getusershell(3), syslogd(8)
917eb9fe 200.SH BUGS
917eb9fe
KM
201The anonymous account is inherently dangerous and should
202avoided when possible.
203.PP
204The server must run as the super-user
205to create sockets with privileged port numbers. It maintains
206an effective user id of the logged in user, reverting to
207the super-user only when binding addresses to sockets. The
208possible security holes have been extensively
209scrutinized, but are possibly incomplete.