xref: /minix3/libexec/ftpd/ftpd.8 (revision 62da011387586b019f85cdc44165baf17b9633da)
1*62da0113SBen Gras.\"	$NetBSD: ftpd.8,v 1.85 2009/05/01 10:53:27 wiz Exp $
2*62da0113SBen Gras.\"
3*62da0113SBen Gras.\" Copyright (c) 1997-2008 The NetBSD Foundation, Inc.
4*62da0113SBen Gras.\" All rights reserved.
5*62da0113SBen Gras.\"
6*62da0113SBen Gras.\" This code is derived from software contributed to The NetBSD Foundation
7*62da0113SBen Gras.\" by Luke Mewburn.
8*62da0113SBen Gras.\"
9*62da0113SBen Gras.\" Redistribution and use in source and binary forms, with or without
10*62da0113SBen Gras.\" modification, are permitted provided that the following conditions
11*62da0113SBen Gras.\" are met:
12*62da0113SBen Gras.\" 1. Redistributions of source code must retain the above copyright
13*62da0113SBen Gras.\"    notice, this list of conditions and the following disclaimer.
14*62da0113SBen Gras.\" 2. Redistributions in binary form must reproduce the above copyright
15*62da0113SBen Gras.\"    notice, this list of conditions and the following disclaimer in the
16*62da0113SBen Gras.\"    documentation and/or other materials provided with the distribution.
17*62da0113SBen Gras.\"
18*62da0113SBen Gras.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19*62da0113SBen Gras.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20*62da0113SBen Gras.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21*62da0113SBen Gras.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22*62da0113SBen Gras.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23*62da0113SBen Gras.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24*62da0113SBen Gras.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25*62da0113SBen Gras.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26*62da0113SBen Gras.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27*62da0113SBen Gras.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28*62da0113SBen Gras.\" POSSIBILITY OF SUCH DAMAGE.
29*62da0113SBen Gras.\"
30*62da0113SBen Gras.\" Copyright (c) 1985, 1988, 1991, 1993
31*62da0113SBen Gras.\"	The Regents of the University of California.  All rights reserved.
32*62da0113SBen Gras.\"
33*62da0113SBen Gras.\" Redistribution and use in source and binary forms, with or without
34*62da0113SBen Gras.\" modification, are permitted provided that the following conditions
35*62da0113SBen Gras.\" are met:
36*62da0113SBen Gras.\" 1. Redistributions of source code must retain the above copyright
37*62da0113SBen Gras.\"    notice, this list of conditions and the following disclaimer.
38*62da0113SBen Gras.\" 2. Redistributions in binary form must reproduce the above copyright
39*62da0113SBen Gras.\"    notice, this list of conditions and the following disclaimer in the
40*62da0113SBen Gras.\"    documentation and/or other materials provided with the distribution.
41*62da0113SBen Gras.\" 3. Neither the name of the University nor the names of its contributors
42*62da0113SBen Gras.\"    may be used to endorse or promote products derived from this software
43*62da0113SBen Gras.\"    without specific prior written permission.
44*62da0113SBen Gras.\"
45*62da0113SBen Gras.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
46*62da0113SBen Gras.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
47*62da0113SBen Gras.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
48*62da0113SBen Gras.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
49*62da0113SBen Gras.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
50*62da0113SBen Gras.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
51*62da0113SBen Gras.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
52*62da0113SBen Gras.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
53*62da0113SBen Gras.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
54*62da0113SBen Gras.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
55*62da0113SBen Gras.\" SUCH DAMAGE.
56*62da0113SBen Gras.\"
57*62da0113SBen Gras.\"     @(#)ftpd.8	8.2 (Berkeley) 4/19/94
58*62da0113SBen Gras.\"
59*62da0113SBen Gras.Dd May 1, 2009
60*62da0113SBen Gras.Dt FTPD 8
61*62da0113SBen Gras.Os
62*62da0113SBen Gras.Sh NAME
63*62da0113SBen Gras.Nm ftpd
64*62da0113SBen Gras.Nd
65*62da0113SBen GrasInternet File Transfer Protocol server
66*62da0113SBen Gras.Sh SYNOPSIS
67*62da0113SBen Gras.Nm
68*62da0113SBen Gras.Op Fl 46DdHlnQqrsUuWwX
69*62da0113SBen Gras.Op Fl a Ar anondir
70*62da0113SBen Gras.Op Fl C Ar user Ns Op @ Ns Ar host
71*62da0113SBen Gras.Op Fl c Ar confdir
72*62da0113SBen Gras.Op Fl e Ar emailaddr
73*62da0113SBen Gras.Op Fl h Ar hostname
74*62da0113SBen Gras.Op Fl L Ar xferlogfile
75*62da0113SBen Gras.Op Fl P Ar dataport
76*62da0113SBen Gras.Op Fl V Ar version
77*62da0113SBen Gras.Sh DESCRIPTION
78*62da0113SBen Gras.Nm
79*62da0113SBen Grasis the Internet File Transfer Protocol server process.
80*62da0113SBen GrasThe server uses the
81*62da0113SBen Gras.Tn TCP
82*62da0113SBen Grasprotocol and listens at the port specified in the
83*62da0113SBen Gras.Dq ftp
84*62da0113SBen Grasservice specification; see
85*62da0113SBen Gras.Xr services 5 .
86*62da0113SBen Gras.Pp
87*62da0113SBen GrasAvailable options:
88*62da0113SBen Gras.Bl -tag -width Ds
89*62da0113SBen Gras.It Fl 4
90*62da0113SBen GrasWhen
91*62da0113SBen Gras.Fl D
92*62da0113SBen Grasis specified, bind to IPv4 addresses only.
93*62da0113SBen Gras.It Fl 6
94*62da0113SBen GrasWhen
95*62da0113SBen Gras.Fl D
96*62da0113SBen Grasis specified, bind to IPv6 addresses only.
97*62da0113SBen Gras.It Fl a Ar anondir
98*62da0113SBen GrasDefine
99*62da0113SBen Gras.Ar anondir
100*62da0113SBen Grasas the directory to
101*62da0113SBen Gras.Xr chroot 2
102*62da0113SBen Grasinto for anonymous logins.
103*62da0113SBen GrasDefault is the home directory for the ftp user.
104*62da0113SBen GrasThis can also be specified with the
105*62da0113SBen Gras.Xr ftpd.conf 5
106*62da0113SBen Gras.Sy chroot
107*62da0113SBen Grasdirective.
108*62da0113SBen Gras.It Fl C Ar user Ns Op @ Ns Ar host
109*62da0113SBen GrasCheck whether
110*62da0113SBen Gras.Ar user
111*62da0113SBen Gras.Po
112*62da0113SBen Grasas if connecting from
113*62da0113SBen Gras.Ar host ,
114*62da0113SBen Grasif provided
115*62da0113SBen Gras.Pc
116*62da0113SBen Graswould be granted access under
117*62da0113SBen Grasthe restrictions given in
118*62da0113SBen Gras.Xr ftpusers 5 ,
119*62da0113SBen Grasand exit without attempting a connection.
120*62da0113SBen Gras.Nm
121*62da0113SBen Grasexits with an exit code of 0 if access would be granted, or 1 otherwise.
122*62da0113SBen GrasThis can be useful for testing configurations.
123*62da0113SBen Gras.It Fl c Ar confdir
124*62da0113SBen GrasChange the root directory of the configuration files from
125*62da0113SBen Gras.Dq Pa /etc
126*62da0113SBen Grasto
127*62da0113SBen Gras.Ar confdir .
128*62da0113SBen GrasThis changes the directory for the following files:
129*62da0113SBen Gras.Pa /etc/ftpchroot ,
130*62da0113SBen Gras.Pa /etc/ftpusers ,
131*62da0113SBen Gras.Pa /etc/ftpwelcome ,
132*62da0113SBen Gras.Pa /etc/motd ,
133*62da0113SBen Grasand the file specified by the
134*62da0113SBen Gras.Xr ftpd.conf 5
135*62da0113SBen Gras.Sy limit
136*62da0113SBen Grasdirective.
137*62da0113SBen Gras.It Fl D
138*62da0113SBen GrasRun as daemon.
139*62da0113SBen Gras.Nm
140*62da0113SBen Graswill listen on the default FTP port for incoming connections
141*62da0113SBen Grasand fork a child for each connection.
142*62da0113SBen GrasThis is lower overhead than starting
143*62da0113SBen Gras.Nm
144*62da0113SBen Grasfrom
145*62da0113SBen Gras.Xr inetd 8
146*62da0113SBen Grasand thus might be useful on busy servers to reduce load.
147*62da0113SBen Gras.It Fl d
148*62da0113SBen GrasDebugging information is written to the syslog using a facility of
149*62da0113SBen Gras.Dv LOG_FTP .
150*62da0113SBen Gras.It Fl e Ar emailaddr
151*62da0113SBen GrasUse
152*62da0113SBen Gras.Ar emailaddr
153*62da0113SBen Grasfor the
154*62da0113SBen Gras.Dq "\&%E"
155*62da0113SBen Grasescape sequence (see
156*62da0113SBen Gras.Sx Display file escape sequences )
157*62da0113SBen Gras.It Fl H
158*62da0113SBen GrasEquivalent to
159*62da0113SBen Gras.Do
160*62da0113SBen Gras-h
161*62da0113SBen Gras`hostname`
162*62da0113SBen Gras.Dc .
163*62da0113SBen Gras.It Fl h Ar hostname
164*62da0113SBen GrasExplicitly set the hostname to advertise as to
165*62da0113SBen Gras.Ar hostname .
166*62da0113SBen GrasThe default is the hostname associated with the IP address that
167*62da0113SBen Gras.Nm
168*62da0113SBen Grasis listening on.
169*62da0113SBen GrasThis ability (with or without
170*62da0113SBen Gras.Fl h ) ,
171*62da0113SBen Grasin conjunction with
172*62da0113SBen Gras.Fl c Ar confdir ,
173*62da0113SBen Grasis useful when configuring
174*62da0113SBen Gras.Sq virtual
175*62da0113SBen Gras.Tn FTP
176*62da0113SBen Grasservers, each listening on separate addresses as separate names.
177*62da0113SBen GrasRefer to
178*62da0113SBen Gras.Xr inetd.conf 5
179*62da0113SBen Grasfor more information on starting services to listen on specific IP addresses.
180*62da0113SBen Gras.It Fl L Ar xferlogfile
181*62da0113SBen GrasLog
182*62da0113SBen Gras.Tn wu-ftpd
183*62da0113SBen Grasstyle
184*62da0113SBen Gras.Sq xferlog
185*62da0113SBen Grasentries to
186*62da0113SBen Gras.Ar xferlogfile .
187*62da0113SBen Gras.It Fl l
188*62da0113SBen GrasEach successful and failed
189*62da0113SBen Gras.Tn FTP
190*62da0113SBen Grassession is logged using syslog with a facility of
191*62da0113SBen Gras.Dv LOG_FTP .
192*62da0113SBen GrasIf this option is specified more than once, the retrieve (get), store (put),
193*62da0113SBen Grasappend, delete, make directory, remove directory and rename operations and
194*62da0113SBen Grastheir file name arguments are also logged.
195*62da0113SBen Gras.It Fl n
196*62da0113SBen GrasDon't attempt translation of IP addresses to hostnames.
197*62da0113SBen Gras.It Fl P Ar dataport
198*62da0113SBen GrasUse
199*62da0113SBen Gras.Ar dataport
200*62da0113SBen Grasas the data port, overriding the default of using the port one less
201*62da0113SBen Grasthat the port
202*62da0113SBen Gras.Nm
203*62da0113SBen Grasis listening on.
204*62da0113SBen Gras.It Fl Q
205*62da0113SBen GrasDisable the use of pid files for keeping track of the number of logged-in
206*62da0113SBen Grasusers per class.
207*62da0113SBen GrasThis may reduce the load on heavily loaded
208*62da0113SBen Gras.Tn FTP
209*62da0113SBen Grasservers.
210*62da0113SBen Gras.It Fl q
211*62da0113SBen GrasEnable the use of pid files for keeping track of the number of logged-in
212*62da0113SBen Grasusers per class.
213*62da0113SBen GrasThis is the default.
214*62da0113SBen Gras.It Fl r
215*62da0113SBen GrasPermanently drop root privileges once the user is logged in.
216*62da0113SBen GrasThe use of this option may result in the server using a port other
217*62da0113SBen Grasthan the (listening-port - 1) for
218*62da0113SBen Gras.Sy PORT
219*62da0113SBen Grasstyle commands, which is contrary to the
220*62da0113SBen Gras.Cm RFC 959
221*62da0113SBen Grasspecification, but in practice very few clients rely upon this behaviour.
222*62da0113SBen GrasSee
223*62da0113SBen Gras.Sx SECURITY CONSIDERATIONS
224*62da0113SBen Grasbelow for more details.
225*62da0113SBen Gras.It Fl s
226*62da0113SBen GrasRequire a secure authentication mechanism like Kerberos or S/Key to be used.
227*62da0113SBen Gras.It Fl U
228*62da0113SBen GrasDon't log each concurrent
229*62da0113SBen Gras.Tn FTP
230*62da0113SBen Grassession to
231*62da0113SBen Gras.Pa /var/run/utmp .
232*62da0113SBen GrasThis is the default.
233*62da0113SBen Gras.It Fl u
234*62da0113SBen GrasLog each concurrent
235*62da0113SBen Gras.Tn FTP
236*62da0113SBen Grassession to
237*62da0113SBen Gras.Pa /var/run/utmp ,
238*62da0113SBen Grasmaking them visible to commands such as
239*62da0113SBen Gras.Xr who 1 .
240*62da0113SBen Gras.It Fl V Ar version
241*62da0113SBen GrasUse
242*62da0113SBen Gras.Ar version
243*62da0113SBen Grasas the version to advertise in the login banner and in the output of
244*62da0113SBen Gras.Sy STAT
245*62da0113SBen Grasand
246*62da0113SBen Gras.Sy SYST
247*62da0113SBen Grasinstead of the default version information.
248*62da0113SBen GrasIf
249*62da0113SBen Gras.Ar version
250*62da0113SBen Grasis empty or
251*62da0113SBen Gras.Sq -
252*62da0113SBen Grasthen don't display any version information.
253*62da0113SBen Gras.It Fl W
254*62da0113SBen GrasDon't log each
255*62da0113SBen Gras.Tn FTP
256*62da0113SBen Grassession to
257*62da0113SBen Gras.Pa /var/log/wtmp .
258*62da0113SBen Gras.It Fl w
259*62da0113SBen GrasLog each
260*62da0113SBen Gras.Tn FTP
261*62da0113SBen Grassession to
262*62da0113SBen Gras.Pa /var/log/wtmp ,
263*62da0113SBen Grasmaking them visible to commands such as
264*62da0113SBen Gras.Xr last 1 .
265*62da0113SBen GrasThis is the default.
266*62da0113SBen Gras.It Fl X
267*62da0113SBen GrasLog
268*62da0113SBen Gras.Tn wu-ftpd
269*62da0113SBen Grasstyle
270*62da0113SBen Gras.Sq xferlog
271*62da0113SBen Grasentries to the syslog, prefixed with
272*62da0113SBen Gras.Dq "xferlog:\ " ,
273*62da0113SBen Grasusing a facility of
274*62da0113SBen Gras.Dv LOG_FTP .
275*62da0113SBen GrasThese syslog entries can be converted to a
276*62da0113SBen Gras.Tn wu-ftpd
277*62da0113SBen Grasstyle
278*62da0113SBen Gras.Pa xferlog
279*62da0113SBen Grasfile suitable for input into a third-party log analysis tool with a command
280*62da0113SBen Grassimilar to:
281*62da0113SBen Gras.Dl "sed -ne 's/^.*xferlog: //p' /var/log/xferlog \*[Gt] wuxferlog"
282*62da0113SBen Gras.El
283*62da0113SBen Gras.Pp
284*62da0113SBen GrasThe file
285*62da0113SBen Gras.Pa /etc/nologin
286*62da0113SBen Grascan be used to disable
287*62da0113SBen Gras.Tn FTP
288*62da0113SBen Grasaccess.
289*62da0113SBen GrasIf the file exists,
290*62da0113SBen Gras.Nm
291*62da0113SBen Grasdisplays it and exits.
292*62da0113SBen GrasIf the file
293*62da0113SBen Gras.Pa /etc/ftpwelcome
294*62da0113SBen Grasexists,
295*62da0113SBen Gras.Nm
296*62da0113SBen Grasprints it before issuing the
297*62da0113SBen Gras.Dq ready
298*62da0113SBen Grasmessage.
299*62da0113SBen GrasIf the file
300*62da0113SBen Gras.Pa /etc/motd
301*62da0113SBen Grasexists (under the chroot directory if applicable),
302*62da0113SBen Gras.Nm
303*62da0113SBen Grasprints it after a successful login.
304*62da0113SBen GrasThis may be changed with the
305*62da0113SBen Gras.Xr ftpd.conf 5
306*62da0113SBen Grasdirective
307*62da0113SBen Gras.Sy motd .
308*62da0113SBen Gras.Pp
309*62da0113SBen GrasThe
310*62da0113SBen Gras.Nm
311*62da0113SBen Grasserver currently supports the following
312*62da0113SBen Gras.Tn FTP
313*62da0113SBen Grasrequests.
314*62da0113SBen GrasThe case of the requests is ignored.
315*62da0113SBen Gras.Bl -column "Request" "Description" -offset indent
316*62da0113SBen Gras.It Sy Request Ta Sy Description
317*62da0113SBen Gras.It ABOR Ta "abort previous command"
318*62da0113SBen Gras.It ACCT Ta "specify account (ignored)"
319*62da0113SBen Gras.It ALLO Ta "allocate storage (vacuously)"
320*62da0113SBen Gras.It APPE Ta "append to a file"
321*62da0113SBen Gras.It CDUP Ta "change to parent of current working directory"
322*62da0113SBen Gras.It CWD Ta "change working directory"
323*62da0113SBen Gras.It DELE Ta "delete a file"
324*62da0113SBen Gras.It EPSV Ta "prepare for server-to-server transfer"
325*62da0113SBen Gras.It EPRT Ta "specify data connection port"
326*62da0113SBen Gras.It FEAT Ta "list extra features that are not defined in" Cm "RFC 959"
327*62da0113SBen Gras.It HELP Ta "give help information"
328*62da0113SBen Gras.It LIST Ta "give list files in a directory" Pq Dq Li "ls -lA"
329*62da0113SBen Gras.It LPSV Ta "prepare for server-to-server transfer"
330*62da0113SBen Gras.It LPRT Ta "specify data connection port"
331*62da0113SBen Gras.It MLSD Ta "list contents of directory in a machine-processable form"
332*62da0113SBen Gras.It MLST Ta "show a pathname in a machine-processable form"
333*62da0113SBen Gras.It MKD Ta "make a directory"
334*62da0113SBen Gras.It MDTM Ta "show last modification time of file"
335*62da0113SBen Gras.It MODE Ta "specify data transfer" Em mode
336*62da0113SBen Gras.It NLST Ta "give name list of files in directory"
337*62da0113SBen Gras.It NOOP Ta "do nothing"
338*62da0113SBen Gras.It OPTS Ta "define persistent options for a given command"
339*62da0113SBen Gras.It PASS Ta "specify password"
340*62da0113SBen Gras.It PASV Ta "prepare for server-to-server transfer"
341*62da0113SBen Gras.It PORT Ta "specify data connection port"
342*62da0113SBen Gras.It PWD Ta "print the current working directory"
343*62da0113SBen Gras.It QUIT Ta "terminate session"
344*62da0113SBen Gras.It REST Ta "restart incomplete transfer"
345*62da0113SBen Gras.It RETR Ta "retrieve a file"
346*62da0113SBen Gras.It RMD Ta "remove a directory"
347*62da0113SBen Gras.It RNFR Ta "specify rename-from file name"
348*62da0113SBen Gras.It RNTO Ta "specify rename-to file name"
349*62da0113SBen Gras.It SITE Ta "non-standard commands (see next section)"
350*62da0113SBen Gras.It SIZE Ta "return size of file"
351*62da0113SBen Gras.It STAT Ta "return status of server"
352*62da0113SBen Gras.It STOR Ta "store a file"
353*62da0113SBen Gras.It STOU Ta "store a file with a unique name"
354*62da0113SBen Gras.It STRU Ta "specify data transfer" Em structure
355*62da0113SBen Gras.It SYST Ta "show operating system type of server system"
356*62da0113SBen Gras.It TYPE Ta "specify data transfer" Em type
357*62da0113SBen Gras.It USER Ta "specify user name"
358*62da0113SBen Gras.It XCUP Ta "change to parent of current working directory (deprecated)"
359*62da0113SBen Gras.It XCWD Ta "change working directory (deprecated)"
360*62da0113SBen Gras.It XMKD Ta "make a directory (deprecated)"
361*62da0113SBen Gras.It XPWD Ta "print the current working directory (deprecated)"
362*62da0113SBen Gras.It XRMD Ta "remove a directory (deprecated)"
363*62da0113SBen Gras.El
364*62da0113SBen Gras.Pp
365*62da0113SBen GrasThe following non-standard or
366*62da0113SBen Gras.Ux
367*62da0113SBen Grasspecific commands are supported by the SITE request.
368*62da0113SBen Gras.Pp
369*62da0113SBen Gras.Bl -column Request Description -offset indent
370*62da0113SBen Gras.It Sy Request Ta Sy Description
371*62da0113SBen Gras.It CHMOD Ta "change mode of a file, e.g. ``SITE CHMOD 755 filename''"
372*62da0113SBen Gras.It HELP Ta "give help information."
373*62da0113SBen Gras.It IDLE Ta "set idle-timer, e.g. ``SITE IDLE 60''"
374*62da0113SBen Gras.It RATEGET Ta "set maximum get rate throttle in bytes/second, e.g. ``SITE RATEGET 5k''"
375*62da0113SBen Gras.It RATEPUT Ta "set maximum put rate throttle in bytes/second, e.g. ``SITE RATEPUT 5k''"
376*62da0113SBen Gras.It UMASK Ta "change umask, e.g. ``SITE UMASK 002''"
377*62da0113SBen Gras.El
378*62da0113SBen Gras.Pp
379*62da0113SBen GrasThe following
380*62da0113SBen Gras.Tn FTP
381*62da0113SBen Grasrequests (as specified in
382*62da0113SBen Gras.Cm RFC 959
383*62da0113SBen Grasand
384*62da0113SBen Gras.Cm RFC 2228 )
385*62da0113SBen Grasare recognized, but are not implemented:
386*62da0113SBen Gras.Sy ACCT ,
387*62da0113SBen Gras.Sy ADAT ,
388*62da0113SBen Gras.Sy AUTH ,
389*62da0113SBen Gras.Sy CCC ,
390*62da0113SBen Gras.Sy CONF ,
391*62da0113SBen Gras.Sy ENC ,
392*62da0113SBen Gras.Sy MIC ,
393*62da0113SBen Gras.Sy PBSZ ,
394*62da0113SBen Gras.Sy PROT ,
395*62da0113SBen Gras.Sy REIN ,
396*62da0113SBen Grasand
397*62da0113SBen Gras.Sy SMNT .
398*62da0113SBen Gras.Pp
399*62da0113SBen GrasThe
400*62da0113SBen Gras.Nm
401*62da0113SBen Grasserver will abort an active file transfer only when the
402*62da0113SBen Gras.Sy ABOR
403*62da0113SBen Grascommand is preceded by a Telnet "Interrupt Process" (IP)
404*62da0113SBen Grassignal and a Telnet "Synch" signal in the command Telnet stream,
405*62da0113SBen Grasas described in Internet
406*62da0113SBen Gras.Cm RFC 959 .
407*62da0113SBen GrasIf a
408*62da0113SBen Gras.Sy STAT
409*62da0113SBen Grascommand is received during a data transfer, preceded by a Telnet IP
410*62da0113SBen Grasand Synch, transfer status will be returned.
411*62da0113SBen Gras.Pp
412*62da0113SBen Gras.Nm
413*62da0113SBen Grasinterprets file names according to the
414*62da0113SBen Gras.Dq globbing
415*62da0113SBen Grasconventions used by
416*62da0113SBen Gras.Xr csh 1 .
417*62da0113SBen GrasThis allows users to use the metacharacters
418*62da0113SBen Gras.Dq Li \&*?[]{}~ .
419*62da0113SBen Gras.Ss User authentication
420*62da0113SBen Gras.Nm
421*62da0113SBen Grasauthenticates users according to five rules.
422*62da0113SBen Gras.Pp
423*62da0113SBen Gras.Bl -enum -offset indent
424*62da0113SBen Gras.It
425*62da0113SBen GrasThe login name must be in the password data base,
426*62da0113SBen Gras.Xr passwd 5 ,
427*62da0113SBen Grasand not have a null password.
428*62da0113SBen GrasIn this case a password must be provided by the client before any
429*62da0113SBen Grasfile operations may be performed.
430*62da0113SBen GrasIf the user has an S/Key key, the response from a successful
431*62da0113SBen Gras.Sy USER
432*62da0113SBen Grascommand will include an S/Key challenge.
433*62da0113SBen GrasThe client may choose to respond with a
434*62da0113SBen Gras.Sy PASS
435*62da0113SBen Grascommand giving either
436*62da0113SBen Grasa standard password or an S/Key one-time password.
437*62da0113SBen GrasThe server will automatically determine which type of password it
438*62da0113SBen Grashas been given and attempt to authenticate accordingly.
439*62da0113SBen GrasSee
440*62da0113SBen Gras.Xr skey 1
441*62da0113SBen Grasfor more information on S/Key authentication.
442*62da0113SBen GrasS/Key is a Trademark of Bellcore.
443*62da0113SBen Gras.It
444*62da0113SBen GrasThe login name must be allowed based on the information in
445*62da0113SBen Gras.Xr ftpusers 5 .
446*62da0113SBen Gras.It
447*62da0113SBen GrasThe user must have a standard shell returned by
448*62da0113SBen Gras.Xr getusershell 3 .
449*62da0113SBen GrasIf the user's shell field in the password database is empty, the
450*62da0113SBen Grasshell is assumed to be
451*62da0113SBen Gras.Pa /bin/sh .
452*62da0113SBen GrasAs per
453*62da0113SBen Gras.Xr shells 5 ,
454*62da0113SBen Grasthe user's shell must be listed with full path in
455*62da0113SBen Gras.Pa /etc/shells .
456*62da0113SBen Gras.It
457*62da0113SBen GrasIf directed by the file
458*62da0113SBen Gras.Xr ftpchroot 5
459*62da0113SBen Grasthe session's root directory will be changed by
460*62da0113SBen Gras.Xr chroot 2
461*62da0113SBen Grasto the directory specified in the
462*62da0113SBen Gras.Xr ftpd.conf 5
463*62da0113SBen Gras.Sy chroot
464*62da0113SBen Grasdirective (if set),
465*62da0113SBen Grasor to the home directory of the user.
466*62da0113SBen GrasThis facility may also be triggered by enabling the boolean
467*62da0113SBen Gras.Sy ftp-chroot
468*62da0113SBen Grasin
469*62da0113SBen Gras.Xr login.conf 5 .
470*62da0113SBen GrasHowever, the user must still supply a password.
471*62da0113SBen GrasThis feature is intended as a compromise between a fully anonymous account
472*62da0113SBen Grasand a fully privileged account.
473*62da0113SBen GrasThe account should also be set up as for an anonymous account.
474*62da0113SBen Gras.It
475*62da0113SBen GrasIf the user name is
476*62da0113SBen Gras.Dq anonymous
477*62da0113SBen Grasor
478*62da0113SBen Gras.Dq ftp ,
479*62da0113SBen Grasan
480*62da0113SBen Grasanonymous
481*62da0113SBen Gras.Tn FTP
482*62da0113SBen Grasaccount must be present in the password
483*62da0113SBen Grasfile (user
484*62da0113SBen Gras.Dq ftp ) .
485*62da0113SBen GrasIn this case the user is allowed
486*62da0113SBen Grasto log in by specifying any password (by convention an email address for
487*62da0113SBen Grasthe user should be used as the password).
488*62da0113SBen Gras.Pp
489*62da0113SBen GrasThe server performs a
490*62da0113SBen Gras.Xr chroot 2
491*62da0113SBen Grasto the directory specified in the
492*62da0113SBen Gras.Xr ftpd.conf 5
493*62da0113SBen Gras.Sy chroot
494*62da0113SBen Grasdirective (if set),
495*62da0113SBen Grasthe
496*62da0113SBen Gras.Fl a Ar anondir
497*62da0113SBen Grasdirectory (if set),
498*62da0113SBen Grasor to the home directory of the
499*62da0113SBen Gras.Dq ftp
500*62da0113SBen Grasuser.
501*62da0113SBen Gras.Pp
502*62da0113SBen GrasThe server then performs a
503*62da0113SBen Gras.Xr chdir 2
504*62da0113SBen Grasto the directory specified in the
505*62da0113SBen Gras.Xr ftpd.conf 5
506*62da0113SBen Gras.Sy homedir
507*62da0113SBen Grasdirective (if set), otherwise to
508*62da0113SBen Gras.Pa / .
509*62da0113SBen Gras.Pp
510*62da0113SBen GrasIf other restrictions are required (such as disabling of certain
511*62da0113SBen Grascommands and the setting of a specific umask), then appropriate
512*62da0113SBen Grasentries in
513*62da0113SBen Gras.Xr ftpd.conf 5
514*62da0113SBen Grasare required.
515*62da0113SBen Gras.Pp
516*62da0113SBen GrasIf the first character of the password supplied by an anonymous user
517*62da0113SBen Grasis
518*62da0113SBen Gras.Dq - ,
519*62da0113SBen Grasthen the verbose messages displayed at login and upon a
520*62da0113SBen Gras.Sy CWD
521*62da0113SBen Grascommand are suppressed.
522*62da0113SBen Gras.El
523*62da0113SBen Gras.Ss Display file escape sequences
524*62da0113SBen GrasWhen
525*62da0113SBen Gras.Nm
526*62da0113SBen Grasdisplays various files back to the client (such as
527*62da0113SBen Gras.Pa /etc/ftpwelcome
528*62da0113SBen Grasand
529*62da0113SBen Gras.Pa /etc/motd ) ,
530*62da0113SBen Grasvarious escape strings are replaced with information pertinent
531*62da0113SBen Grasto the current connection.
532*62da0113SBen Gras.Pp
533*62da0113SBen GrasThe supported escape strings are:
534*62da0113SBen Gras.Bl -tag -width "Escape" -offset indent -compact
535*62da0113SBen Gras.It Sy "Escape"
536*62da0113SBen Gras.Sy Description
537*62da0113SBen Gras.It "\&%c"
538*62da0113SBen GrasClass name.
539*62da0113SBen Gras.It "\&%C"
540*62da0113SBen GrasCurrent working directory.
541*62da0113SBen Gras.It "\&%E"
542*62da0113SBen GrasEmail address given with
543*62da0113SBen Gras.Fl e .
544*62da0113SBen Gras.It "\&%L"
545*62da0113SBen GrasLocal hostname.
546*62da0113SBen Gras.It "\&%M"
547*62da0113SBen GrasMaximum number of users for this class.
548*62da0113SBen GrasDisplays
549*62da0113SBen Gras.Dq unlimited
550*62da0113SBen Grasif there's no limit.
551*62da0113SBen Gras.It "\&%N"
552*62da0113SBen GrasCurrent number of users for this class.
553*62da0113SBen Gras.It "\&%R"
554*62da0113SBen GrasRemote hostname.
555*62da0113SBen Gras.It "\&%s"
556*62da0113SBen GrasIf the result of the most recent
557*62da0113SBen Gras.Dq "\&%M"
558*62da0113SBen Grasor
559*62da0113SBen Gras.Dq "\&%N"
560*62da0113SBen Graswas not
561*62da0113SBen Gras.Dq Li 1 ,
562*62da0113SBen Grasprint an
563*62da0113SBen Gras.Dq s .
564*62da0113SBen Gras.It "\&%S"
565*62da0113SBen GrasIf the result of the most recent
566*62da0113SBen Gras.Dq "\&%M"
567*62da0113SBen Grasor
568*62da0113SBen Gras.Dq "\&%N"
569*62da0113SBen Graswas not
570*62da0113SBen Gras.Dq Li 1 ,
571*62da0113SBen Grasprint an
572*62da0113SBen Gras.Dq S .
573*62da0113SBen Gras.It "\&%T"
574*62da0113SBen GrasCurrent time.
575*62da0113SBen Gras.It "\&%U"
576*62da0113SBen GrasUser name.
577*62da0113SBen Gras.It "\&%\&%"
578*62da0113SBen GrasA
579*62da0113SBen Gras.Dq \&%
580*62da0113SBen Grascharacter.
581*62da0113SBen Gras.El
582*62da0113SBen Gras.Ss Setting up a restricted ftp subtree
583*62da0113SBen GrasIn order that system security is not breached, it is recommended
584*62da0113SBen Grasthat the
585*62da0113SBen Grassubtrees for the
586*62da0113SBen Gras.Dq ftp
587*62da0113SBen Grasand
588*62da0113SBen Gras.Dq chroot
589*62da0113SBen Grasaccounts be constructed with care, following these rules
590*62da0113SBen Gras(replace
591*62da0113SBen Gras.Dq ftp
592*62da0113SBen Grasin the following directory names
593*62da0113SBen Graswith the appropriate account name for
594*62da0113SBen Gras.Sq chroot
595*62da0113SBen Grasusers):
596*62da0113SBen Gras.Bl -tag -width "~ftp/incoming" -offset indent
597*62da0113SBen Gras.It Pa ~ftp
598*62da0113SBen GrasMake the home directory owned by
599*62da0113SBen Gras.Dq root
600*62da0113SBen Grasand unwritable by anyone.
601*62da0113SBen Gras.It Pa ~ftp/bin
602*62da0113SBen GrasMake this directory owned by
603*62da0113SBen Gras.Dq root
604*62da0113SBen Grasand unwritable by anyone (mode 555).
605*62da0113SBen GrasGenerally any conversion commands should be installed
606*62da0113SBen Grashere (mode 111).
607*62da0113SBen Gras.It Pa ~ftp/etc
608*62da0113SBen GrasMake this directory owned by
609*62da0113SBen Gras.Dq root
610*62da0113SBen Grasand unwritable by anyone (mode 555).
611*62da0113SBen GrasThe files
612*62da0113SBen Gras.Pa pwd.db
613*62da0113SBen Gras(see
614*62da0113SBen Gras.Xr passwd 5 )
615*62da0113SBen Grasand
616*62da0113SBen Gras.Pa group
617*62da0113SBen Gras(see
618*62da0113SBen Gras.Xr group 5 )
619*62da0113SBen Grasmust be present for the
620*62da0113SBen Gras.Sy LIST
621*62da0113SBen Grascommand to be able to display owner and group names instead of numbers.
622*62da0113SBen GrasThe password field in
623*62da0113SBen Gras.Xr passwd 5
624*62da0113SBen Grasis not used, and should not contain real passwords.
625*62da0113SBen GrasThe file
626*62da0113SBen Gras.Pa motd ,
627*62da0113SBen Grasif present, will be printed after a successful login.
628*62da0113SBen GrasThese files should be mode 444.
629*62da0113SBen Gras.It Pa ~ftp/pub
630*62da0113SBen GrasThis directory and the subdirectories beneath it should be owned
631*62da0113SBen Grasby the users and groups responsible for placing files in them,
632*62da0113SBen Grasand be writable only by them (mode 755 or 775).
633*62da0113SBen GrasThey should
634*62da0113SBen Gras.Em not
635*62da0113SBen Grasbe owned or writable by ftp or its group.
636*62da0113SBen Gras.It Pa ~ftp/incoming
637*62da0113SBen GrasThis directory is where anonymous users place files they upload.
638*62da0113SBen GrasThe owners should be the user
639*62da0113SBen Gras.Dq ftp
640*62da0113SBen Grasand an appropriate group.
641*62da0113SBen GrasMembers of this group will be the only users with access to these
642*62da0113SBen Grasfiles after they have been uploaded; these should be people who
643*62da0113SBen Grasknow how to deal with them appropriately.
644*62da0113SBen GrasIf you wish anonymous
645*62da0113SBen Gras.Tn FTP
646*62da0113SBen Grasusers to be able to see the names of the
647*62da0113SBen Grasfiles in this directory the permissions should be 770, otherwise
648*62da0113SBen Grasthey should be 370.
649*62da0113SBen Gras.Pp
650*62da0113SBen GrasThe following
651*62da0113SBen Gras.Xr ftpd.conf 5
652*62da0113SBen Grasdirectives should be used:
653*62da0113SBen Gras.Dl "modify guest off"
654*62da0113SBen Gras.Dl "umask  guest 0707"
655*62da0113SBen Gras.Dl "upload guest on"
656*62da0113SBen Gras.Pp
657*62da0113SBen GrasThis will result in anonymous users being able to upload files to this
658*62da0113SBen Grasdirectory, but they will not be able to download them, delete them, or
659*62da0113SBen Grasoverwrite them, due to the umask and disabling of the commands mentioned
660*62da0113SBen Grasabove.
661*62da0113SBen Gras.It Pa ~ftp/tmp
662*62da0113SBen GrasThis directory is used to create temporary files which contain
663*62da0113SBen Grasthe error messages generated by a conversion or
664*62da0113SBen Gras.Sy LIST
665*62da0113SBen Grascommand.
666*62da0113SBen GrasThe owner should be the user
667*62da0113SBen Gras.Dq ftp .
668*62da0113SBen GrasThe permissions should be 300.
669*62da0113SBen Gras.Pp
670*62da0113SBen GrasIf you don't enable conversion commands, or don't want anonymous users
671*62da0113SBen Grasuploading files here (see
672*62da0113SBen Gras.Pa ~ftp/incoming
673*62da0113SBen Grasabove), then don't create this directory.
674*62da0113SBen GrasHowever, error messages from conversion or
675*62da0113SBen Gras.Sy LIST
676*62da0113SBen Grascommands won't be returned to the user.
677*62da0113SBen Gras(This is the traditional behaviour.)
678*62da0113SBen GrasNote that the
679*62da0113SBen Gras.Xr ftpd.conf 5
680*62da0113SBen Grasdirective
681*62da0113SBen Gras.Sy upload
682*62da0113SBen Grascan be used to prevent users uploading here.
683*62da0113SBen Gras.El
684*62da0113SBen Gras.Pp
685*62da0113SBen GrasTo set up "ftp-only" accounts that provide only
686*62da0113SBen Gras.Tn FTP ,
687*62da0113SBen Grasbut no valid shell
688*62da0113SBen Graslogin, you can copy/link
689*62da0113SBen Gras.Pa /sbin/nologin
690*62da0113SBen Grasto
691*62da0113SBen Gras.Pa /sbin/ftplogin ,
692*62da0113SBen Grasand enter
693*62da0113SBen Gras.Pa /sbin/ftplogin
694*62da0113SBen Grasto
695*62da0113SBen Gras.Pa /etc/shells
696*62da0113SBen Grasto allow logging-in via
697*62da0113SBen Gras.Tn FTP
698*62da0113SBen Grasinto the accounts, which must have
699*62da0113SBen Gras.Pa /sbin/ftplogin
700*62da0113SBen Grasas login shell.
701*62da0113SBen Gras.Sh FILES
702*62da0113SBen Gras.Bl -tag -width /etc/ftpwelcome -compact
703*62da0113SBen Gras.It Pa /etc/ftpchroot
704*62da0113SBen GrasList of normal users whose root directory should be changed via
705*62da0113SBen Gras.Xr chroot 2 .
706*62da0113SBen Gras.It Pa /etc/ftpd.conf
707*62da0113SBen GrasConfigure file conversions and other settings.
708*62da0113SBen Gras.It Pa /etc/ftpusers
709*62da0113SBen GrasList of unwelcome/restricted users.
710*62da0113SBen Gras.It Pa /etc/ftpwelcome
711*62da0113SBen GrasWelcome notice before login.
712*62da0113SBen Gras.It Pa /etc/motd
713*62da0113SBen GrasWelcome notice after login.
714*62da0113SBen Gras.It Pa /etc/nologin
715*62da0113SBen GrasIf it exists, displayed and access is refused.
716*62da0113SBen Gras.It Pa /var/run/ftpd.pids-CLASS
717*62da0113SBen GrasState file of logged-in processes for the
718*62da0113SBen Gras.Nm
719*62da0113SBen Grasclass
720*62da0113SBen Gras.Sq CLASS .
721*62da0113SBen Gras.It Pa /var/run/utmp
722*62da0113SBen GrasList of logged-in users on the system.
723*62da0113SBen Gras.It Pa /var/log/wtmp
724*62da0113SBen GrasLogin history database.
725*62da0113SBen Gras.El
726*62da0113SBen Gras.Sh SEE ALSO
727*62da0113SBen Gras.Xr ftp 1 ,
728*62da0113SBen Gras.Xr skey 1 ,
729*62da0113SBen Gras.Xr who 1 ,
730*62da0113SBen Gras.Xr getusershell 3 ,
731*62da0113SBen Gras.Xr ftpchroot 5 ,
732*62da0113SBen Gras.Xr ftpd.conf 5 ,
733*62da0113SBen Gras.Xr ftpusers 5 ,
734*62da0113SBen Gras.Xr login.conf 5 ,
735*62da0113SBen Gras.Xr syslogd 8
736*62da0113SBen Gras.Sh STANDARDS
737*62da0113SBen Gras.Nm
738*62da0113SBen Grasrecognizes all commands in
739*62da0113SBen Gras.Cm RFC 959 ,
740*62da0113SBen Grasfollows the guidelines in
741*62da0113SBen Gras.Cm RFC 1123 ,
742*62da0113SBen Grasrecognizes all commands in
743*62da0113SBen Gras.Cm RFC 2228
744*62da0113SBen Gras(although they are not supported yet),
745*62da0113SBen Grasand supports the extensions from
746*62da0113SBen Gras.Cm RFC 2389 ,
747*62da0113SBen Gras.Cm RFC 2428 ,
748*62da0113SBen Grasand
749*62da0113SBen Gras.Cm RFC 3659 .
750*62da0113SBen Gras.Sh HISTORY
751*62da0113SBen GrasThe
752*62da0113SBen Gras.Nm
753*62da0113SBen Grascommand appeared in
754*62da0113SBen Gras.Bx 4.2 .
755*62da0113SBen Gras.Pp
756*62da0113SBen GrasVarious features such as the
757*62da0113SBen Gras.Xr ftpd.conf 5
758*62da0113SBen Grasfunctionality,
759*62da0113SBen Gras.Cm RFC 2389 ,
760*62da0113SBen Grasand
761*62da0113SBen Gras.Cm RFC 3659
762*62da0113SBen Grassupport was implemented in
763*62da0113SBen Gras.Nx 1.3
764*62da0113SBen Grasand later releases by Luke Mewburn.
765*62da0113SBen Gras.Sh BUGS
766*62da0113SBen GrasThe server must run as the super-user to create sockets with
767*62da0113SBen Grasprivileged port numbers (i.e, those less than
768*62da0113SBen Gras.Dv IPPORT_RESERVED ,
769*62da0113SBen Graswhich is 1024).
770*62da0113SBen GrasIf
771*62da0113SBen Gras.Nm
772*62da0113SBen Grasis listening on a privileged port
773*62da0113SBen Grasit maintains an effective user id of the logged in user, reverting
774*62da0113SBen Grasto the super-user only when binding addresses to privileged sockets.
775*62da0113SBen GrasThe
776*62da0113SBen Gras.Fl r
777*62da0113SBen Grasoption can be used to override this behaviour and force privileges to
778*62da0113SBen Grasbe permanently revoked; see
779*62da0113SBen Gras.Sx SECURITY CONSIDERATIONS
780*62da0113SBen Grasbelow for more details.
781*62da0113SBen Gras.Pp
782*62da0113SBen Gras.Nm
783*62da0113SBen Grasmay have trouble handling connections from scoped IPv6 addresses, or
784*62da0113SBen GrasIPv4 mapped addresses
785*62da0113SBen Gras.Po
786*62da0113SBen GrasIPv4 connection on
787*62da0113SBen Gras.Dv AF_INET6
788*62da0113SBen Grassocket
789*62da0113SBen Gras.Pc .
790*62da0113SBen GrasFor the latter case, running two daemons,
791*62da0113SBen Grasone for IPv4 and one for IPv6, will avoid the problem.
792*62da0113SBen Gras.Sh SECURITY CONSIDERATIONS
793*62da0113SBen Gras.Cm RFC 959
794*62da0113SBen Grasprovides no restrictions on the
795*62da0113SBen Gras.Sy PORT
796*62da0113SBen Grascommand, and this can lead to security problems, as
797*62da0113SBen Gras.Nm
798*62da0113SBen Grascan be fooled into connecting to any service on any host.
799*62da0113SBen GrasWith the
800*62da0113SBen Gras.Dq checkportcmd
801*62da0113SBen Grasfeature of the
802*62da0113SBen Gras.Xr ftpd.conf 5 ,
803*62da0113SBen Gras.Sy PORT
804*62da0113SBen Grascommands with different host addresses, or TCP ports lower than
805*62da0113SBen Gras.Dv IPPORT_RESERVED
806*62da0113SBen Graswill be rejected.
807*62da0113SBen GrasThis also prevents
808*62da0113SBen Gras.Sq third-party proxy ftp
809*62da0113SBen Grasfrom working.
810*62da0113SBen GrasUse of this option is
811*62da0113SBen Gras.Em strongly
812*62da0113SBen Grasrecommended, and enabled by default.
813*62da0113SBen Gras.Pp
814*62da0113SBen GrasBy default
815*62da0113SBen Gras.Nm
816*62da0113SBen Grasuses a port that is one less than the port it is listening on to
817*62da0113SBen Grascommunicate back to the client for the
818*62da0113SBen Gras.Sy EPRT ,
819*62da0113SBen Gras.Sy LPRT ,
820*62da0113SBen Grasand
821*62da0113SBen Gras.Sy PORT
822*62da0113SBen Grascommands, unless overridden with
823*62da0113SBen Gras.Fl P Ar dataport .
824*62da0113SBen GrasAs the default port for
825*62da0113SBen Gras.Nm
826*62da0113SBen Gras(21) is a privileged port below
827*62da0113SBen Gras.Dv IPPORT_RESERVED ,
828*62da0113SBen Gras.Nm
829*62da0113SBen Grasretains the ability to switch back to root privileges to bind these
830*62da0113SBen Grasports.
831*62da0113SBen GrasIn order to increase security by reducing the potential for a bug in
832*62da0113SBen Gras.Nm
833*62da0113SBen Grasproviding a remote root compromise,
834*62da0113SBen Gras.Nm
835*62da0113SBen Graswill permanently drop root privileges if one of the following is true:
836*62da0113SBen Gras.Bl -enum -offset indent
837*62da0113SBen Gras.It
838*62da0113SBen Gras.Nm
839*62da0113SBen Grasis running on a port greater than
840*62da0113SBen Gras.Dv IPPORT_RESERVED
841*62da0113SBen Grasand the user has logged in as a
842*62da0113SBen Gras.Sq guest
843*62da0113SBen Grasor
844*62da0113SBen Gras.Sq chroot
845*62da0113SBen Grasuser.
846*62da0113SBen Gras.It
847*62da0113SBen Gras.Nm
848*62da0113SBen Graswas invoked with
849*62da0113SBen Gras.Fl r .
850*62da0113SBen Gras.El
851*62da0113SBen Gras.Pp
852*62da0113SBen GrasDon't create
853*62da0113SBen Gras.Pa ~ftp/tmp
854*62da0113SBen Grasif you don't want anonymous users to upload files there.
855*62da0113SBen GrasThat directory is only necessary if you want to display the error
856*62da0113SBen Grasmessages of conversion commands to the user.
857*62da0113SBen GrasNote that if uploads are disabled with the
858*62da0113SBen Gras.Xr ftpd.conf 5
859*62da0113SBen Grasdirective
860*62da0113SBen Gras.Sy upload ,
861*62da0113SBen Grasthen this directory cannot be abused by the user in this way, so it
862*62da0113SBen Grasshould be safe to create.
863*62da0113SBen Gras.Pp
864*62da0113SBen GrasTo avoid possible denial-of-service attacks,
865*62da0113SBen Gras.Sy SIZE
866*62da0113SBen Grasrequests against files larger than 10240 bytes will be denied if
867*62da0113SBen Grasthe current transfer
868*62da0113SBen Gras.Sy TYPE
869*62da0113SBen Grasis
870*62da0113SBen Gras.Sq Li A
871*62da0113SBen Gras(ASCII).
872