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