build ex, not a.out
[unix-history] / usr / src / libexec / ftpd / ftpd.8
CommitLineData
43c671de
KB
1.\" Copyright (c) 1985 The Regents of the University of California.
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.\"
43c671de
KB
16.\" @(#)ftpd.8 6.5 (Berkeley) %G%
17.\"
18.TH FTPD 8 ""
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
30]
31.SH DESCRIPTION
32.I Ftpd
33is the DARPA Internet File Transfer Prototocol
34server process. The server uses the TCP protocol
35and listens at the port specified in the ``ftp''
36service specification; see
37.IR services (5).
38.PP
39If the
40.B \-d
41option is specified,
2c32d7db 42debugging information is written to the syslog.
917eb9fe
KM
43.PP
44If the
45.B \-l
46option is specified,
2c32d7db 47each ftp session is logged in the syslog.
917eb9fe
KM
48.PP
49The ftp server
2c32d7db 50will timeout an inactive session after 15 minutes.
917eb9fe
KM
51If the
52.B \-t
53option is specified,
54the inactivity timeout period will be set to
55.IR timeout .
56.PP
57The ftp server currently supports the following ftp
58requests; case is not distinguished.
59.PP
60.nf
61.ta \w'Request 'u
62\fBRequest Description\fP
1bd029de 63ABOR abort previous command
917eb9fe
KM
64ACCT specify account (ignored)
65ALLO allocate storage (vacuously)
66APPE append to a file
1bd029de 67CDUP change to parent of current working directory
917eb9fe
KM
68CWD change working directory
69DELE delete a file
70HELP give help information
71LIST give list files in a directory (``ls -lg'')
1bd029de 72MKD make a directory
917eb9fe
KM
73MODE specify data transfer \fImode\fP
74NLST give name list of files in directory (``ls'')
75NOOP do nothing
76PASS specify password
1bd029de 77PASV prepare for server-to-server transfer
917eb9fe 78PORT specify data connection port
1bd029de 79PWD print the current working directory
917eb9fe
KM
80QUIT terminate session
81RETR retrieve a file
1bd029de 82RMD remove a directory
917eb9fe
KM
83RNFR specify rename-from file name
84RNTO specify rename-to file name
85STOR store a file
1bd029de 86STOU store a file with a unique name
917eb9fe
KM
87STRU specify data transfer \fIstructure\fP
88TYPE specify data transfer \fItype\fP
89USER specify user name
90XCUP change to parent of current working directory
91XCWD change working directory
92XMKD make a directory
93XPWD print the current working directory
94XRMD remove a directory
95.fi
96.PP
1bd029de 97The remaining ftp requests specified in Internet RFC 959 are
917eb9fe
KM
98recognized, but not implemented.
99.PP
1bd029de
GM
100The ftp server will abort an active file transfer only when the
101ABOR command is preceded by a Telnet "Interrupt Process" (IP)
102signal and a Telnet "Synch" signal in the command Telnet stream,
103as described in Internet RFC 959.
104.PP
917eb9fe
KM
105.I Ftpd
106interprets file names according to the ``globbing''
107conventions used by
108.IR csh (1).
109This allows users to utilize the metacharacters ``*?[]{}~''.
110.PP
111.I Ftpd
112authenticates users according to three rules.
113.IP 1)
114The user name must be in the password data base,
115.IR /etc/passwd ,
116and not have a null password. In this case a password
117must be provided by the client before any file operations
118may be performed.
119.IP 2)
120The user name must not appear in the file
121.IR /etc/ftpusers .
122.IP 3)
06e77c11
KM
123The user must have a standard shell returned by
124.IR getusershell (3).
125.IP 4)
917eb9fe
KM
126If the user name is ``anonymous'' or ``ftp'', an
127anonymous ftp account must be present in the password
128file (user ``ftp''). In this case the user is allowed
129to log in by specifying any password (by convention this
130is given as the client host's name).
131.PP
132In the last case,
133.I ftpd
134takes special measures to restrict the client's access privileges.
135The server performs a
136.IR chroot (2)
137command to the home directory of the ``ftp'' user.
138In order that system security is not breached, it is recommended
139that the ``ftp'' subtree be constructed with care; the following
140rules are recommended.
141.IP ~ftp)
142Make the home directory owned by ``ftp'' and unwritable by anyone.
143.IP ~ftp/bin)
144Make this directory owned by the super-user and unwritable by
145anyone. The program
146.IR ls (1)
147must be present to support the list commands. This
148program should have mode 111.
149.IP ~ftp/etc)
150Make this directory owned by the super-user and unwritable by
151anyone. The files
152.IR passwd (5)
153and
154.IR group (5)
155must be present for the
156.I ls
157command to work properly. These files should be mode 444.
158.IP ~ftp/pub)
159Make this directory mode 777 and owned by ``ftp''. Users
160should then place files which are to be accessible via the
161anonymous account in this directory.
162.SH "SEE ALSO"
43c671de 163ftp(1), getusershell(3), syslogd(8)
917eb9fe 164.SH BUGS
917eb9fe
KM
165The anonymous account is inherently dangerous and should
166avoided when possible.
167.PP
168The server must run as the super-user
169to create sockets with privileged port numbers. It maintains
170an effective user id of the logged in user, reverting to
171the super-user only when binding addresses to sockets. The
172possible security holes have been extensively
173scrutinized, but are possibly incomplete.