1 .\" Copyright (c) 1985, 1988, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)ftpd.8 8.3 (Berkeley) 6/1/94
40 Internet File Transfer Protocol server
44 .Op Fl T Ar maxtimeout
49 Internet File Transfer Protocol
50 server process. The server uses the
53 and listens at the port specified in the
55 service specification; see
61 Debugging information is written to the syslog using LOG_FTP.
63 Each successful and failed
65 session is logged using syslog with a facility of LOG_FTP.
66 If this option is specified twice, the retrieve (get), store (put), append,
67 delete, make directory, remove directory and rename operations and
68 their filename arguments are also logged.
70 A client may also request a different timeout period;
71 the maximum period allowed may be set to
76 The default limit is 2 hours.
78 The inactivity timeout period is set to
80 seconds (the default is 15 minutes).
85 can be used to disable ftp access.
88 displays it and exits.
93 prints it before issuing the
100 prints it after a successful login.
102 The ftp server currently supports the following ftp requests.
103 The case of the requests is ignored.
104 .Bl -column "Request" -offset indent
105 .It Request Ta "Description"
106 .It ABOR Ta "abort previous command"
107 .It ACCT Ta "specify account (ignored)"
108 .It ALLO Ta "allocate storage (vacuously)"
109 .It APPE Ta "append to a file"
110 .It CDUP Ta "change to parent of current working directory"
111 .It CWD Ta "change working directory"
112 .It DELE Ta "delete a file"
113 .It HELP Ta "give help information"
114 .It LIST Ta "give list files in a directory" Pq Dq Li "ls -lgA"
115 .It MKD Ta "make a directory"
116 .It MDTM Ta "show last modification time of file"
117 .It MODE Ta "specify data transfer" Em mode
118 .It NLST Ta "give name list of files in directory"
119 .It NOOP Ta "do nothing"
120 .It PASS Ta "specify password"
121 .It PASV Ta "prepare for server-to-server transfer"
122 .It PORT Ta "specify data connection port"
123 .It PWD Ta "print the current working directory"
124 .It QUIT Ta "terminate session"
125 .It REST Ta "restart incomplete transfer"
126 .It RETR Ta "retrieve a file"
127 .It RMD Ta "remove a directory"
128 .It RNFR Ta "specify rename-from file name"
129 .It RNTO Ta "specify rename-to file name"
130 .It SITE Ta "non-standard commands (see next section)"
131 .It SIZE Ta "return size of file"
132 .It STAT Ta "return status of server"
133 .It STOR Ta "store a file"
134 .It STOU Ta "store a file with a unique name"
135 .It STRU Ta "specify data transfer" Em structure
136 .It SYST Ta "show operating system type of server system"
137 .It TYPE Ta "specify data transfer" Em type
138 .It USER Ta "specify user name"
139 .It XCUP Ta "change to parent of current working directory (deprecated)"
140 .It XCWD Ta "change working directory (deprecated)"
141 .It XMKD Ta "make a directory (deprecated)"
142 .It XPWD Ta "print the current working directory (deprecated)"
143 .It XRMD Ta "remove a directory (deprecated)"
146 The following non-standard or
148 specific commands are supported
152 .Bl -column Request -offset indent
153 .It Sy Request Ta Sy Description
154 .It UMASK Ta change umask, e.g. ``SITE UMASK 002''
155 .It IDLE Ta set idle-timer, e.g. ``SITE IDLE 60''
156 .It CHMOD Ta change mode of a file, e.g. ``SITE CHMOD 755 filename''
157 .It HELP Ta give help information.
160 The remaining ftp requests specified in Internet RFC 959
162 recognized, but not implemented.
163 MDTM and SIZE are not specified in RFC 959, but will appear in the
164 next updated FTP RFC.
166 The ftp server will abort an active file transfer only when the
168 command is preceded by a Telnet "Interrupt Process" (IP)
169 signal and a Telnet "Synch" signal in the command Telnet stream,
170 as described in Internet RFC 959.
173 command is received during a data transfer, preceded by a Telnet IP
174 and Synch, transfer status will be returned.
177 interprets file names according to the
181 This allows users to utilize the metacharacters
185 authenticates users according to three rules.
187 .Bl -enum -offset indent
189 The login name must be in the password data base,
191 and not have a null password.
192 In this case a password must be provided by the client before any
193 file operations may be performed.
195 The login name must not appear in the file
198 The user must have a standard shell returned by
206 anonymous ftp account must be present in the password
209 In this case the user is allowed
210 to log in by specifying any password (by convention an email address for
211 the user should be used as the password).
216 takes special measures to restrict the client's access privileges.
217 The server performs a
219 to the home directory of the
222 In order that system security is not breached, it is recommended
225 subtree be constructed with care, following these rules:
226 .Bl -tag -width "~ftp/pub" -offset indent
228 Make the home directory owned by
230 and unwritable by anyone.
233 Make this directory owned by
235 and unwritable by anyone (mode 555).
238 must be present to support the list command.
239 This program should be mode 111.
241 Make this directory owned by
243 and unwritable by anyone (mode 555).
248 must be present for the
250 command to be able to produce owner names rather than numbers.
251 The password field in
253 is not used, and should not contain real passwords.
256 if present, will be printed after a successful login.
257 These files should be mode 444.
259 Make this directory mode 777 and owned by
262 can then place files which are to be accessible via the anonymous
263 account in this directory.
266 .Bl -tag -width /etc/ftpwelcome -compact
268 List of unwelcome/restricted users.
269 .It Pa /etc/ftpwelcome
272 Welcome notice after login.
274 Displayed and access refused.
281 The server must run as the super-user
282 to create sockets with privileged port numbers. It maintains
283 an effective user id of the logged in user, reverting to
284 the super-user only when binding addresses to sockets. The
285 possible security holes have been extensively
286 scrutinized, but are possibly incomplete.