force glob failure to result in original string being used (from
[unix-history] / usr / src / libexec / ftpd / ftpd.8
CommitLineData
917eb9fe
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
d2e77476 5.\" @(#)ftpd.8 6.1 (Berkeley) %G%
917eb9fe 6.\"
d2e77476 7.TH FTPD 8C ""
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,
31each socket created will have debugging turned
32on (SO_DEBUG). With debugging enabled, the system
33will trace all TCP packets sent and received on a
34socket. The program
35.IR trpt (8C)
36may then be used to interpret the packet traces.
37.PP
38If the
39.B \-l
40option is specified,
41each ftp session is logged on the standard output.
42This allows a line of the form
43`/etc/ftpd -l > /tmp/ftplog''
44to be used to conveniently maintain a log of ftp sessions.
45.PP
46The ftp server
47will timeout an inactive session after 60 seconds.
48If the
49.B \-t
50option is specified,
51the inactivity timeout period will be set to
52.IR timeout .
53.PP
54The ftp server currently supports the following ftp
55requests; case is not distinguished.
56.PP
57.nf
58.ta \w'Request 'u
59\fBRequest Description\fP
60ACCT specify account (ignored)
61ALLO allocate storage (vacuously)
62APPE append to a file
63CWD change working directory
64DELE delete a file
65HELP give help information
66LIST give list files in a directory (``ls -lg'')
67MODE specify data transfer \fImode\fP
68NLST give name list of files in directory (``ls'')
69NOOP do nothing
70PASS specify password
71PORT specify data connection port
72QUIT terminate session
73RETR retrieve a file
74RNFR specify rename-from file name
75RNTO specify rename-to file name
76STOR store a file
77STRU specify data transfer \fIstructure\fP
78TYPE specify data transfer \fItype\fP
79USER specify user name
80XCUP change to parent of current working directory
81XCWD change working directory
82XMKD make a directory
83XPWD print the current working directory
84XRMD remove a directory
85.fi
86.PP
87The remaining ftp requests specified in Internet RFC 765 are
88recognized, but not implemented.
89.PP
90.I Ftpd
91interprets file names according to the ``globbing''
92conventions used by
93.IR csh (1).
94This allows users to utilize the metacharacters ``*?[]{}~''.
95.PP
96.I Ftpd
97authenticates users according to three rules.
98.IP 1)
99The user name must be in the password data base,
100.IR /etc/passwd ,
101and not have a null password. In this case a password
102must be provided by the client before any file operations
103may be performed.
104.IP 2)
105The user name must not appear in the file
106.IR /etc/ftpusers .
107.IP 3)
108If the user name is ``anonymous'' or ``ftp'', an
109anonymous ftp account must be present in the password
110file (user ``ftp''). In this case the user is allowed
111to log in by specifying any password (by convention this
112is given as the client host's name).
113.PP
114In the last case,
115.I ftpd
116takes special measures to restrict the client's access privileges.
117The server performs a
118.IR chroot (2)
119command to the home directory of the ``ftp'' user.
120In order that system security is not breached, it is recommended
121that the ``ftp'' subtree be constructed with care; the following
122rules are recommended.
123.IP ~ftp)
124Make the home directory owned by ``ftp'' and unwritable by anyone.
125.IP ~ftp/bin)
126Make this directory owned by the super-user and unwritable by
127anyone. The program
128.IR ls (1)
129must be present to support the list commands. This
130program should have mode 111.
131.IP ~ftp/etc)
132Make this directory owned by the super-user and unwritable by
133anyone. The files
134.IR passwd (5)
135and
136.IR group (5)
137must be present for the
138.I ls
139command to work properly. These files should be mode 444.
140.IP ~ftp/pub)
141Make this directory mode 777 and owned by ``ftp''. Users
142should then place files which are to be accessible via the
143anonymous account in this directory.
144.SH "SEE ALSO"
145ftp(1C),
146.SH BUGS
147There is no support for aborting commands.
148.PP
149The anonymous account is inherently dangerous and should
150avoided when possible.
151.PP
152The server must run as the super-user
153to create sockets with privileged port numbers. It maintains
154an effective user id of the logged in user, reverting to
155the super-user only when binding addresses to sockets. The
156possible security holes have been extensively
157scrutinized, but are possibly incomplete.