1*62da0113SBen Gras.\" $NetBSD: ftpd.conf.5,v 1.37 2009/04/09 02:25:45 joerg 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.Dd April 13, 2007 31*62da0113SBen Gras.Dt FTPD.CONF 5 32*62da0113SBen Gras.Os 33*62da0113SBen Gras.Sh NAME 34*62da0113SBen Gras.Nm ftpd.conf 35*62da0113SBen Gras.Nd 36*62da0113SBen Gras.Xr ftpd 8 37*62da0113SBen Grasconfiguration file 38*62da0113SBen Gras.Sh DESCRIPTION 39*62da0113SBen GrasThe 40*62da0113SBen Gras.Nm 41*62da0113SBen Grasfile specifies various configuration options for 42*62da0113SBen Gras.Xr ftpd 8 43*62da0113SBen Grasthat apply once a user has authenticated their connection. 44*62da0113SBen Gras.Pp 45*62da0113SBen Gras.Nm 46*62da0113SBen Grasconsists of a series of lines, each of which may contain a 47*62da0113SBen Grasconfiguration directive, a comment, or a blank line. 48*62da0113SBen GrasDirectives that appear later in the file override settings by previous 49*62da0113SBen Grasdirectives. 50*62da0113SBen GrasThis allows 51*62da0113SBen Gras.Sq wildcard 52*62da0113SBen Grasentries to define defaults, and then have class-specific overrides. 53*62da0113SBen Gras.Pp 54*62da0113SBen GrasA directive line has the format: 55*62da0113SBen Gras.Dl command class [arguments] 56*62da0113SBen Gras.Pp 57*62da0113SBen GrasA 58*62da0113SBen Gras.Dq \e 59*62da0113SBen Grasis the escape character; it can be used to escape the meaning of the 60*62da0113SBen Grascomment character, or if it is the last character on a line, extends 61*62da0113SBen Grasa configuration directive across multiple lines. 62*62da0113SBen GrasA 63*62da0113SBen Gras.Dq # 64*62da0113SBen Grasis the comment character, and all characters from it to the end of 65*62da0113SBen Grasline are ignored (unless it is escaped with the escape character). 66*62da0113SBen Gras.Pp 67*62da0113SBen GrasEach authenticated user is a member of a 68*62da0113SBen Gras.Em class , 69*62da0113SBen Graswhich is determined by 70*62da0113SBen Gras.Xr ftpusers 5 . 71*62da0113SBen Gras.Em class 72*62da0113SBen Grasis used to determine which 73*62da0113SBen Gras.Nm 74*62da0113SBen Grasentries apply to the user. 75*62da0113SBen GrasThe following special classes exist when parsing entries in 76*62da0113SBen Gras.Nm : 77*62da0113SBen Gras.Bl -tag -width "chroot" -compact -offset indent 78*62da0113SBen Gras.It Sy all 79*62da0113SBen GrasMatches any class. 80*62da0113SBen Gras.It Sy none 81*62da0113SBen GrasMatches no class. 82*62da0113SBen Gras.El 83*62da0113SBen Gras.Pp 84*62da0113SBen GrasEach class has a type, which may be one of: 85*62da0113SBen Gras.Bl -tag -width "CHROOT" -offset indent 86*62da0113SBen Gras.It Sy GUEST 87*62da0113SBen GrasGuests (as per the 88*62da0113SBen Gras.Dq anonymous 89*62da0113SBen Grasand 90*62da0113SBen Gras.Dq ftp 91*62da0113SBen Graslogins). 92*62da0113SBen GrasA 93*62da0113SBen Gras.Xr chroot 2 94*62da0113SBen Grasis performed after login. 95*62da0113SBen Gras.It Sy CHROOT 96*62da0113SBen Gras.Xr chroot 2 Ns ed 97*62da0113SBen Grasusers (as per 98*62da0113SBen Gras.Xr ftpchroot 5 ) . 99*62da0113SBen GrasA 100*62da0113SBen Gras.Xr chroot 2 101*62da0113SBen Grasis performed after login. 102*62da0113SBen Gras.It Sy REAL 103*62da0113SBen GrasNormal users. 104*62da0113SBen Gras.El 105*62da0113SBen Gras.Pp 106*62da0113SBen GrasThe 107*62da0113SBen Gras.Xr ftpd 8 108*62da0113SBen Gras.Sy STAT 109*62da0113SBen Grascommand will return the class settings for the current user as defined by 110*62da0113SBen Gras.Nm , 111*62da0113SBen Grasunless the 112*62da0113SBen Gras.Sy private 113*62da0113SBen Grasdirective is set for the class. 114*62da0113SBen Gras.Pp 115*62da0113SBen GrasEach configuration line may be one of: 116*62da0113SBen Gras.Bl -tag -width 4n 117*62da0113SBen Gras.It Sy advertize Ar class Op Ar host 118*62da0113SBen GrasSet the address to advertise in the response to the 119*62da0113SBen Gras.Sy PASV 120*62da0113SBen Grasand 121*62da0113SBen Gras.Sy LPSV 122*62da0113SBen Grascommands to the address for 123*62da0113SBen Gras.Ar host 124*62da0113SBen Gras(which may be either a host name or IP address). 125*62da0113SBen GrasThis may be useful in some firewall configurations, although many 126*62da0113SBen Grasftp clients may not work if the address being advertised is different 127*62da0113SBen Grasto the address that they've connected to. 128*62da0113SBen GrasIf 129*62da0113SBen Gras.Ar class 130*62da0113SBen Grasis 131*62da0113SBen Gras.Dq none 132*62da0113SBen Grasor 133*62da0113SBen Gras.Ar host 134*62da0113SBen Grasnot is specified, disable this. 135*62da0113SBen Gras.It Sy checkportcmd Ar class Op Sy off 136*62da0113SBen GrasCheck the 137*62da0113SBen Gras.Sy PORT 138*62da0113SBen Grascommand for validity. 139*62da0113SBen GrasThe 140*62da0113SBen Gras.Sy PORT 141*62da0113SBen Grascommand will fail if the IP address specified does not match the 142*62da0113SBen Gras.Tn FTP 143*62da0113SBen Grascommand connection, or if the remote TCP port number is less than 144*62da0113SBen Gras.Dv IPPORT_RESERVED . 145*62da0113SBen GrasIt is 146*62da0113SBen Gras.Em strongly 147*62da0113SBen Grasencouraged that this option be used, especially for sites concerned 148*62da0113SBen Graswith potential security problems with 149*62da0113SBen Gras.Tn FTP 150*62da0113SBen Grasbounce attacks. 151*62da0113SBen GrasIf 152*62da0113SBen Gras.Ar class 153*62da0113SBen Grasis 154*62da0113SBen Gras.Dq none 155*62da0113SBen Grasor 156*62da0113SBen Gras.Sy off 157*62da0113SBen Grasis specified, disable this feature, otherwise enable it. 158*62da0113SBen Gras.It Sy chroot Ar class Op Sy pathformat 159*62da0113SBen GrasIf 160*62da0113SBen Gras.Ar pathformat 161*62da0113SBen Grasis not specified or 162*62da0113SBen Gras.Ar class 163*62da0113SBen Grasis 164*62da0113SBen Gras.Dq none , 165*62da0113SBen Grasuse the default behavior (see below). 166*62da0113SBen GrasOtherwise, 167*62da0113SBen Gras.Ar pathformat 168*62da0113SBen Grasis parsed to create a directory to create as the root directory with 169*62da0113SBen Gras.Xr chroot 2 170*62da0113SBen Grasinto upon login. 171*62da0113SBen Gras.Pp 172*62da0113SBen Gras.Ar pathformat 173*62da0113SBen Grascan contain the following escape strings: 174*62da0113SBen Gras.Bl -tag -width "Escape" -offset indent -compact 175*62da0113SBen Gras.It Sy "Escape" 176*62da0113SBen Gras.Sy Description 177*62da0113SBen Gras.It "\&%c" 178*62da0113SBen GrasClass name. 179*62da0113SBen Gras.It "\&%d" 180*62da0113SBen GrasHome directory of user. 181*62da0113SBen Gras.It "\&%u" 182*62da0113SBen GrasUser name. 183*62da0113SBen Gras.It "\&%\&%" 184*62da0113SBen GrasA 185*62da0113SBen Gras.Dq \&% 186*62da0113SBen Grascharacter. 187*62da0113SBen Gras.El 188*62da0113SBen Gras.Pp 189*62da0113SBen GrasThe default root directory is: 190*62da0113SBen Gras.Bl -tag -width "CHROOT" -offset indent -compact 191*62da0113SBen Gras.It Sy CHROOT 192*62da0113SBen GrasThe user's home directory. 193*62da0113SBen Gras.It Sy GUEST 194*62da0113SBen GrasIf 195*62da0113SBen Gras.Fl a Ar anondir 196*62da0113SBen Grasis specified, use 197*62da0113SBen Gras.Ar anondir , 198*62da0113SBen Grasotherwise the home directory of the 199*62da0113SBen Gras.Sq ftp 200*62da0113SBen Grasuser. 201*62da0113SBen Gras.It Sy REAL 202*62da0113SBen GrasBy default no 203*62da0113SBen Gras.Xr chroot 2 204*62da0113SBen Grasis performed. 205*62da0113SBen Gras.El 206*62da0113SBen Gras.It Sy classtype Ar class Ar type 207*62da0113SBen GrasSet the class type of 208*62da0113SBen Gras.Ar class 209*62da0113SBen Grasto 210*62da0113SBen Gras.Ar type 211*62da0113SBen Gras(see above). 212*62da0113SBen Gras.It Sy conversion Ar class Ar suffix Op Ar "type disable command" 213*62da0113SBen GrasDefine an automatic in-line file conversion. 214*62da0113SBen GrasIf a file to retrieve ends in 215*62da0113SBen Gras.Ar suffix , 216*62da0113SBen Grasand a real file (sans 217*62da0113SBen Gras.Ar suffix ) 218*62da0113SBen Grasexists, then the output of 219*62da0113SBen Gras.Ar command 220*62da0113SBen Grasis returned instead of the contents of the file. 221*62da0113SBen Gras.Pp 222*62da0113SBen Gras.Bl -tag -width "disable" -offset indent 223*62da0113SBen Gras.It Ar suffix 224*62da0113SBen GrasThe suffix to initiate the conversion. 225*62da0113SBen Gras.It Ar type 226*62da0113SBen GrasA list of valid file types for the conversion. 227*62da0113SBen GrasValid types are: 228*62da0113SBen Gras.Sq f 229*62da0113SBen Gras(file), and 230*62da0113SBen Gras.Sq d 231*62da0113SBen Gras(directory). 232*62da0113SBen Gras.It Ar disable 233*62da0113SBen GrasThe name of file that will prevent conversion if it exists. 234*62da0113SBen GrasA file name of 235*62da0113SBen Gras.Dq Pa \&. 236*62da0113SBen Graswill prevent this disabling action 237*62da0113SBen Gras(i.e., the conversion is always permitted.) 238*62da0113SBen Gras.It Ar command 239*62da0113SBen GrasThe command to run for the conversion. 240*62da0113SBen GrasThe first word should be the full path name 241*62da0113SBen Grasof the command, as 242*62da0113SBen Gras.Xr execv 3 243*62da0113SBen Grasis used to execute the command. 244*62da0113SBen GrasAll instances of the word 245*62da0113SBen Gras.Dq %s 246*62da0113SBen Grasin 247*62da0113SBen Gras.Ar command 248*62da0113SBen Grasare replaced with the requested file (sans 249*62da0113SBen Gras.Ar suffix ) . 250*62da0113SBen Gras.El 251*62da0113SBen Gras.Pp 252*62da0113SBen GrasConversion directives specified later in the file override earlier 253*62da0113SBen Grasconversions with the same suffix. 254*62da0113SBen Gras.It Sy denyquick Ar class Op Sy off 255*62da0113SBen GrasEnforce 256*62da0113SBen Gras.Xr ftpusers 5 257*62da0113SBen Grasrules after the 258*62da0113SBen Gras.Sy USER 259*62da0113SBen Grascommand is received, rather than after the 260*62da0113SBen Gras.Sy PASS 261*62da0113SBen Grascommand is received. 262*62da0113SBen GrasWhilst enabling this feature may allow information leakage about 263*62da0113SBen Grasavailable accounts (for example, if you allow some users of a 264*62da0113SBen Gras.Sy REAL 265*62da0113SBen Grasor 266*62da0113SBen Gras.Sy CHROOT 267*62da0113SBen Grasclass but not others), it is useful in preventing a denied user 268*62da0113SBen Gras(such as 269*62da0113SBen Gras.Sq root ) 270*62da0113SBen Grasfrom entering their password across an insecure connection. 271*62da0113SBen GrasThis option is 272*62da0113SBen Gras.Em strongly 273*62da0113SBen Grasrecommended for servers which run an anonymous-only service. 274*62da0113SBen GrasIf 275*62da0113SBen Gras.Ar class 276*62da0113SBen Grasis 277*62da0113SBen Gras.Dq none 278*62da0113SBen Grasor 279*62da0113SBen Gras.Sy off 280*62da0113SBen Grasis specified, disable this feature, otherwise enable it. 281*62da0113SBen Gras.It Sy display Ar class Op Ar file 282*62da0113SBen GrasIf 283*62da0113SBen Gras.Ar file 284*62da0113SBen Grasis not specified or 285*62da0113SBen Gras.Ar class 286*62da0113SBen Grasis 287*62da0113SBen Gras.Dq none , 288*62da0113SBen Grasdisable this. 289*62da0113SBen GrasOtherwise, each time the user enters a new directory, check if 290*62da0113SBen Gras.Ar file 291*62da0113SBen Grasexists, and if so, display its contents to the user. 292*62da0113SBen GrasEscape sequences are supported; refer to 293*62da0113SBen Gras.Sx Display file escape sequences 294*62da0113SBen Grasin 295*62da0113SBen Gras.Xr ftpd 8 296*62da0113SBen Grasfor more information. 297*62da0113SBen Gras.It Sy hidesymlinks Ar class Op Sy off 298*62da0113SBen GrasIf 299*62da0113SBen Gras.Ar class 300*62da0113SBen Grasis 301*62da0113SBen Gras.Dq none 302*62da0113SBen Grasor 303*62da0113SBen Gras.Sy off 304*62da0113SBen Grasis specified, disable this feature. 305*62da0113SBen GrasOtherwise, the 306*62da0113SBen Gras.Sy LIST 307*62da0113SBen Grascommand lists symbolic links as the file or directory the link 308*62da0113SBen Grasreferences 309*62da0113SBen Gras.Pq Dq Li "ls -LlA" . 310*62da0113SBen GrasServers which run an anonymous service may wish to enable this 311*62da0113SBen Grasfeature for 312*62da0113SBen Gras.Sy GUEST 313*62da0113SBen Grasusers, so that symbolic links do not leak names in 314*62da0113SBen Grasdirectories that are not searchable by 315*62da0113SBen Gras.Sy GUEST 316*62da0113SBen Grasusers. 317*62da0113SBen Gras.It Sy homedir Ar class Op Sy pathformat 318*62da0113SBen GrasIf 319*62da0113SBen Gras.Ar pathformat 320*62da0113SBen Grasis not specified or 321*62da0113SBen Gras.Ar class 322*62da0113SBen Grasis 323*62da0113SBen Gras.Dq none , 324*62da0113SBen Grasuse the default behavior (see below). 325*62da0113SBen GrasOtherwise, 326*62da0113SBen Gras.Ar pathformat 327*62da0113SBen Grasis parsed to create a directory to change into upon login, and to use 328*62da0113SBen Grasas the 329*62da0113SBen Gras.Sq home 330*62da0113SBen Grasdirectory of the user for tilde expansion in pathnames, etc. 331*62da0113SBen Gras.Ar pathformat 332*62da0113SBen Grasis parsed as per the 333*62da0113SBen Gras.Sy chroot 334*62da0113SBen Grasdirective. 335*62da0113SBen Gras.Pp 336*62da0113SBen GrasThe default home directory is the home directory of the user for 337*62da0113SBen Gras.Sy REAL 338*62da0113SBen Grasusers, and 339*62da0113SBen Gras.Pa / 340*62da0113SBen Grasfor 341*62da0113SBen Gras.Sy GUEST 342*62da0113SBen Grasand 343*62da0113SBen Gras.Sy CHROOT 344*62da0113SBen Grasusers. 345*62da0113SBen Gras.It Sy limit Ar class Op Ar count Op Ar file 346*62da0113SBen GrasLimit the maximum number of concurrent connections for 347*62da0113SBen Gras.Ar class 348*62da0113SBen Grasto 349*62da0113SBen Gras.Ar count , 350*62da0113SBen Graswith 351*62da0113SBen Gras.Sq \-1 352*62da0113SBen Grasmeaning unlimited connections. 353*62da0113SBen GrasIf the limit is exceeded and 354*62da0113SBen Gras.Ar file 355*62da0113SBen Grasis specified, display its contents to the user. 356*62da0113SBen GrasIf 357*62da0113SBen Gras.Ar class 358*62da0113SBen Grasis 359*62da0113SBen Gras.Dq none 360*62da0113SBen Grasor 361*62da0113SBen Gras.Ar count 362*62da0113SBen Grasis not specified, disable this. 363*62da0113SBen GrasIf 364*62da0113SBen Gras.Ar file 365*62da0113SBen Grasis a relative path, it will be searched for in 366*62da0113SBen Gras.Pa /etc 367*62da0113SBen Gras(which can be overridden with 368*62da0113SBen Gras.Fl c Ar confdir ) . 369*62da0113SBen Gras.It Sy maxfilesize Ar class Op Ar size 370*62da0113SBen GrasSet the maximum size of an uploaded file to 371*62da0113SBen Gras.Ar size , 372*62da0113SBen Graswith 373*62da0113SBen Gras.Sq \-1 374*62da0113SBen Grasmeaning unlimited connections. 375*62da0113SBen GrasIf 376*62da0113SBen Gras.Ar class 377*62da0113SBen Grasis 378*62da0113SBen Gras.Dq none 379*62da0113SBen Grasor 380*62da0113SBen Gras.Ar size 381*62da0113SBen Grasis not specified, disable this. 382*62da0113SBen Gras.It Sy maxtimeout Ar class Op Ar time 383*62da0113SBen GrasSet the maximum timeout period that a client may request, 384*62da0113SBen Grasdefaulting to two hours. 385*62da0113SBen GrasThis cannot be less than 30 seconds, or the value for 386*62da0113SBen Gras.Sy timeout . 387*62da0113SBen GrasIf 388*62da0113SBen Gras.Ar class 389*62da0113SBen Grasis 390*62da0113SBen Gras.Dq none 391*62da0113SBen Grasor 392*62da0113SBen Gras.Ar time 393*62da0113SBen Grasis not specified, use the default. 394*62da0113SBen Gras.It Sy mmapsize Ar class Op Ar size 395*62da0113SBen GrasSet the size of the sliding window to map a file using 396*62da0113SBen Gras.Xr mmap 2 . 397*62da0113SBen GrasIf zero, 398*62da0113SBen Gras.Xr ftpd 8 399*62da0113SBen Graswill use 400*62da0113SBen Gras.Xr read 2 401*62da0113SBen Grasinstead. 402*62da0113SBen GrasThe default is zero. 403*62da0113SBen GrasThis option affects only binary transfers. 404*62da0113SBen GrasIf 405*62da0113SBen Gras.Ar class 406*62da0113SBen Grasis 407*62da0113SBen Gras.Dq none 408*62da0113SBen Grasor 409*62da0113SBen Gras.Ar size 410*62da0113SBen Grasis not specified, use the default. 411*62da0113SBen Gras.It Sy modify Ar class Op Sy off 412*62da0113SBen GrasIf 413*62da0113SBen Gras.Ar class 414*62da0113SBen Grasis 415*62da0113SBen Gras.Dq none 416*62da0113SBen Grasor 417*62da0113SBen Gras.Sy off 418*62da0113SBen Grasis specified, disable the following commands: 419*62da0113SBen Gras.Sy CHMOD , 420*62da0113SBen Gras.Sy DELE , 421*62da0113SBen Gras.Sy MKD , 422*62da0113SBen Gras.Sy RMD , 423*62da0113SBen Gras.Sy RNFR , 424*62da0113SBen Grasand 425*62da0113SBen Gras.Sy UMASK . 426*62da0113SBen GrasOtherwise, enable them. 427*62da0113SBen Gras.It Sy motd Ar class Op Ar file 428*62da0113SBen GrasIf 429*62da0113SBen Gras.Ar file 430*62da0113SBen Grasis not specified or 431*62da0113SBen Gras.Ar class 432*62da0113SBen Grasis 433*62da0113SBen Gras.Dq none , 434*62da0113SBen Grasdisable this. 435*62da0113SBen GrasOtherwise, use 436*62da0113SBen Gras.Ar file 437*62da0113SBen Grasas the message of the day file to display after login. 438*62da0113SBen GrasEscape sequences are supported; refer to 439*62da0113SBen Gras.Sx Display file escape sequences 440*62da0113SBen Grasin 441*62da0113SBen Gras.Xr ftpd 8 442*62da0113SBen Grasfor more information. 443*62da0113SBen GrasIf 444*62da0113SBen Gras.Ar file 445*62da0113SBen Grasis a relative path, it will be searched for in 446*62da0113SBen Gras.Pa /etc 447*62da0113SBen Gras(which can be overridden with 448*62da0113SBen Gras.Fl c Ar confdir ) . 449*62da0113SBen Gras.It Sy notify Ar class Op Ar fileglob 450*62da0113SBen GrasIf 451*62da0113SBen Gras.Ar fileglob 452*62da0113SBen Grasis not specified or 453*62da0113SBen Gras.Ar class 454*62da0113SBen Grasis 455*62da0113SBen Gras.Dq none , 456*62da0113SBen Grasdisable this. 457*62da0113SBen GrasOtherwise, each time the user enters a new directory, 458*62da0113SBen Grasnotify the user of any files matching 459*62da0113SBen Gras.Ar fileglob . 460*62da0113SBen Gras.It Sy passive Ar class Op Sy off 461*62da0113SBen GrasIf 462*62da0113SBen Gras.Ar class 463*62da0113SBen Grasis 464*62da0113SBen Gras.Dq none 465*62da0113SBen Grasor 466*62da0113SBen Gras.Sy off 467*62da0113SBen Grasis specified, prevent passive 468*62da0113SBen Gras.Sy ( PASV , 469*62da0113SBen Gras.Sy LPSV , 470*62da0113SBen Grasand 471*62da0113SBen Gras.Sy EPSV ) 472*62da0113SBen Grasconnections. 473*62da0113SBen GrasOtherwise, enable them. 474*62da0113SBen Gras.It Sy portrange Ar class Op Ar min Ar max 475*62da0113SBen GrasSet the range of port number which will be used for the passive data port. 476*62da0113SBen Gras.Ar max 477*62da0113SBen Grasmust be greater than 478*62da0113SBen Gras.Ar min , 479*62da0113SBen Grasand both numbers must be be between 480*62da0113SBen Gras.Dv IPPORT_RESERVED 481*62da0113SBen Gras(1024) and 65535. 482*62da0113SBen GrasIf 483*62da0113SBen Gras.Ar class 484*62da0113SBen Grasis 485*62da0113SBen Gras.Dq none 486*62da0113SBen Grasor no arguments are specified, disable this. 487*62da0113SBen Gras.It Sy private Ar class Op Sy off 488*62da0113SBen GrasIf 489*62da0113SBen Gras.Ar class 490*62da0113SBen Grasis 491*62da0113SBen Gras.Dq none 492*62da0113SBen Grasor 493*62da0113SBen Gras.Sy off 494*62da0113SBen Grasis specified, do not display class information in the output of the 495*62da0113SBen Gras.Sy STAT 496*62da0113SBen Grascommand. 497*62da0113SBen GrasOtherwise, display the information. 498*62da0113SBen Gras.It Sy rateget Ar class Op Ar rate 499*62da0113SBen GrasSet the maximum get 500*62da0113SBen Gras.Pq Sy RETR 501*62da0113SBen Grastransfer rate throttle for 502*62da0113SBen Gras.Ar class 503*62da0113SBen Grasto 504*62da0113SBen Gras.Ar rate 505*62da0113SBen Grasbytes per second. 506*62da0113SBen GrasIf 507*62da0113SBen Gras.Ar rate 508*62da0113SBen Grasis 0, the throttle is disabled. 509*62da0113SBen GrasIf 510*62da0113SBen Gras.Ar class 511*62da0113SBen Grasis 512*62da0113SBen Gras.Dq none 513*62da0113SBen Grasor 514*62da0113SBen Gras.Ar rate 515*62da0113SBen Grasis not specified, disable this. 516*62da0113SBen Gras.It Sy rateput Ar class Op Ar rate 517*62da0113SBen GrasSet the maximum put 518*62da0113SBen Gras.Pq Sy STOR 519*62da0113SBen Grastransfer rate throttle for 520*62da0113SBen Gras.Ar class 521*62da0113SBen Grasto 522*62da0113SBen Gras.Ar rate 523*62da0113SBen Grasbytes per second. 524*62da0113SBen GrasIf 525*62da0113SBen Gras.Ar rate 526*62da0113SBen Grasis 0, the throttle is disabled. 527*62da0113SBen GrasIf 528*62da0113SBen Gras.Ar class 529*62da0113SBen Grasis 530*62da0113SBen Gras.Dq none 531*62da0113SBen Grasor 532*62da0113SBen Gras.Ar rate 533*62da0113SBen Grasis not specified, disable this. 534*62da0113SBen Gras.It Sy readsize Ar class Op Ar size 535*62da0113SBen GrasSet the size of the read buffer to 536*62da0113SBen Gras.Xr read 2 537*62da0113SBen Grasa file. 538*62da0113SBen GrasThe default is the file system block size. 539*62da0113SBen GrasThis option affects only binary transfers. 540*62da0113SBen GrasIf 541*62da0113SBen Gras.Ar class 542*62da0113SBen Grasis 543*62da0113SBen Gras.Dq none 544*62da0113SBen Grasor 545*62da0113SBen Gras.Ar size 546*62da0113SBen Grasis not specified, use the default. 547*62da0113SBen Gras.It Sy recvbufsize Ar class Op Ar size 548*62da0113SBen GrasSet the size of the socket receive buffer. 549*62da0113SBen GrasThe default is zero and the system default value will be used. 550*62da0113SBen GrasThis option affects only passive transfers. 551*62da0113SBen GrasIf 552*62da0113SBen Gras.Ar class 553*62da0113SBen Grasis 554*62da0113SBen Gras.Dq none 555*62da0113SBen Grasor 556*62da0113SBen Gras.Ar size 557*62da0113SBen Grasis not specified, use the default. 558*62da0113SBen Gras.It Sy sanenames Ar class Op Sy off 559*62da0113SBen GrasIf 560*62da0113SBen Gras.Ar class 561*62da0113SBen Grasis 562*62da0113SBen Gras.Dq none 563*62da0113SBen Grasor 564*62da0113SBen Gras.Sy off 565*62da0113SBen Grasis specified, allow uploaded file names to contain any characters valid for a 566*62da0113SBen Grasfile name. 567*62da0113SBen GrasOtherwise, only permit file names which don't start with a 568*62da0113SBen Gras.Sq \&. 569*62da0113SBen Grasand only comprise of characters from the set 570*62da0113SBen Gras.Dq [-+,._A-Za-z0-9] . 571*62da0113SBen Gras.It Sy sendbufsize Ar class Op Ar size 572*62da0113SBen GrasSet the size of the socket send buffer. 573*62da0113SBen GrasThe default is zero and the system default value will be used. 574*62da0113SBen GrasThis option affects only binary transfers. 575*62da0113SBen GrasIf 576*62da0113SBen Gras.Ar class 577*62da0113SBen Grasis 578*62da0113SBen Gras.Dq none 579*62da0113SBen Grasor 580*62da0113SBen Gras.Ar size 581*62da0113SBen Grasis not specified, use the default. 582*62da0113SBen Gras.It Sy sendlowat Ar class Op Ar size 583*62da0113SBen GrasSet the low water mark of socket send buffer. 584*62da0113SBen GrasThe default is zero and system default value will be used. 585*62da0113SBen GrasThis option affects only for binary transfer. 586*62da0113SBen GrasIf 587*62da0113SBen Gras.Ar class 588*62da0113SBen Grasis 589*62da0113SBen Gras.Dq none 590*62da0113SBen Grasor 591*62da0113SBen Gras.Ar size 592*62da0113SBen Grasis not specified, use the default. 593*62da0113SBen Gras.It Sy template Ar class Op Ar refclass 594*62da0113SBen GrasDefine 595*62da0113SBen Gras.Ar refclass 596*62da0113SBen Grasas the 597*62da0113SBen Gras.Sq template 598*62da0113SBen Grasfor 599*62da0113SBen Gras.Ar class ; 600*62da0113SBen Grasany reference to 601*62da0113SBen Gras.Ar refclass 602*62da0113SBen Grasin following directives will also apply to members of 603*62da0113SBen Gras.Ar class . 604*62da0113SBen GrasThis is useful to define a template class so that other classes which are 605*62da0113SBen Grasto share common attributes can be easily defined without unnecessary 606*62da0113SBen Grasduplication. 607*62da0113SBen GrasThere can be only one template defined at a time. 608*62da0113SBen GrasIf 609*62da0113SBen Gras.Ar refclass 610*62da0113SBen Grasis not specified, disable the template for 611*62da0113SBen Gras.Ar class . 612*62da0113SBen Gras.It Sy timeout Ar class Op Ar time 613*62da0113SBen GrasSet the inactivity timeout period. 614*62da0113SBen Gras(the default is fifteen minutes). 615*62da0113SBen GrasThis cannot be less than 30 seconds, or greater than the value for 616*62da0113SBen Gras.Sy maxtimeout . 617*62da0113SBen GrasIf 618*62da0113SBen Gras.Ar class 619*62da0113SBen Grasis 620*62da0113SBen Gras.Dq none 621*62da0113SBen Grasor 622*62da0113SBen Gras.Ar time 623*62da0113SBen Grasis not specified, use the default. 624*62da0113SBen Gras.It Sy umask Ar class Op Ar umaskval 625*62da0113SBen GrasSet the umask to 626*62da0113SBen Gras.Ar umaskval . 627*62da0113SBen GrasIf 628*62da0113SBen Gras.Ar class 629*62da0113SBen Grasis 630*62da0113SBen Gras.Dq none 631*62da0113SBen Grasor 632*62da0113SBen Gras.Ar umaskval 633*62da0113SBen Grasis not specified, set to the default of 634*62da0113SBen Gras.Li 027 . 635*62da0113SBen Gras.It Sy upload Ar class Op Sy off 636*62da0113SBen GrasIf 637*62da0113SBen Gras.Ar class 638*62da0113SBen Grasis 639*62da0113SBen Gras.Dq none 640*62da0113SBen Grasor 641*62da0113SBen Gras.Sy off 642*62da0113SBen Grasis specified, disable the following commands: 643*62da0113SBen Gras.Sy APPE , 644*62da0113SBen Gras.Sy STOR , 645*62da0113SBen Grasand 646*62da0113SBen Gras.Sy STOU , 647*62da0113SBen Grasas well as the modify commands: 648*62da0113SBen Gras.Sy CHMOD , 649*62da0113SBen Gras.Sy DELE , 650*62da0113SBen Gras.Sy MKD , 651*62da0113SBen Gras.Sy RMD , 652*62da0113SBen Gras.Sy RNFR , 653*62da0113SBen Grasand 654*62da0113SBen Gras.Sy UMASK . 655*62da0113SBen GrasOtherwise, enable them. 656*62da0113SBen Gras.It Sy writesize Ar class Op Ar size 657*62da0113SBen GrasLimit the number of bytes to 658*62da0113SBen Gras.Xr write 2 659*62da0113SBen Grasat a time. 660*62da0113SBen GrasThe default is zero, which means all the data available as a result of 661*62da0113SBen Gras.Xr mmap 2 662*62da0113SBen Grasor 663*62da0113SBen Gras.Xr read 2 664*62da0113SBen Graswill be written at a time. 665*62da0113SBen GrasThis option affects only binary transfers. 666*62da0113SBen GrasIf 667*62da0113SBen Gras.Ar class 668*62da0113SBen Grasis 669*62da0113SBen Gras.Dq none 670*62da0113SBen Grasor 671*62da0113SBen Gras.Ar size 672*62da0113SBen Grasis not specified, use the default. 673*62da0113SBen Gras.El 674*62da0113SBen Gras.Ss Numeric argument suffix parsing 675*62da0113SBen GrasWhere command arguments are numeric, a decimal number is expected. 676*62da0113SBen GrasTwo or more numbers may be separated by an 677*62da0113SBen Gras.Dq x 678*62da0113SBen Grasto indicate a product. 679*62da0113SBen GrasEach number may have one of the following optional suffixes: 680*62da0113SBen Gras.Bl -tag -width 3n -offset indent -compact 681*62da0113SBen Gras.It b 682*62da0113SBen GrasBlock; multiply by 512 683*62da0113SBen Gras.It k 684*62da0113SBen GrasKibi; multiply by 1024 (1 KiB) 685*62da0113SBen Gras.It m 686*62da0113SBen GrasMebi; multiply by 1048576 (1 MiB) 687*62da0113SBen Gras.It g 688*62da0113SBen GrasGibi; multiply by 1073741824 (1 GiB) 689*62da0113SBen Gras.It t 690*62da0113SBen GrasTebi; multiply by 1099511627776 (1 TiB) 691*62da0113SBen Gras.It w 692*62da0113SBen GrasWord; multiply by the number of bytes in an integer 693*62da0113SBen Gras.El 694*62da0113SBen Gras.Pp 695*62da0113SBen GrasSee 696*62da0113SBen Gras.Xr strsuftoll 3 697*62da0113SBen Grasfor more information. 698*62da0113SBen Gras.Sh DEFAULTS 699*62da0113SBen GrasThe following defaults are used: 700*62da0113SBen Gras.Pp 701*62da0113SBen Gras.Bd -literal -offset indent -compact 702*62da0113SBen Grascheckportcmd all 703*62da0113SBen Grasclasstype chroot CHROOT 704*62da0113SBen Grasclasstype guest GUEST 705*62da0113SBen Grasclasstype real REAL 706*62da0113SBen Grasdisplay none 707*62da0113SBen Graslimit all \-1 # unlimited connections 708*62da0113SBen Grasmaxtimeout all 7200 # 2 hours 709*62da0113SBen Grasmodify all 710*62da0113SBen Grasmotd all motd 711*62da0113SBen Grasnotify none 712*62da0113SBen Graspassive all 713*62da0113SBen Grastimeout all 900 # 15 minutes 714*62da0113SBen Grasumask all 027 715*62da0113SBen Grasupload all 716*62da0113SBen Grasmodify guest off 717*62da0113SBen Grasumask guest 0707 718*62da0113SBen Gras.Ed 719*62da0113SBen Gras.Sh FILES 720*62da0113SBen Gras.Bl -tag -width /usr/share/examples/ftpd/ftpd.conf -compact 721*62da0113SBen Gras.It Pa /etc/ftpd.conf 722*62da0113SBen GrasThis file. 723*62da0113SBen Gras.It Pa /usr/share/examples/ftpd/ftpd.conf 724*62da0113SBen GrasA sample 725*62da0113SBen Gras.Nm 726*62da0113SBen Grasfile. 727*62da0113SBen Gras.El 728*62da0113SBen Gras.Sh SEE ALSO 729*62da0113SBen Gras.Xr strsuftoll 3 , 730*62da0113SBen Gras.Xr ftpchroot 5 , 731*62da0113SBen Gras.Xr ftpusers 5 , 732*62da0113SBen Gras.Xr ftpd 8 733*62da0113SBen Gras.Sh HISTORY 734*62da0113SBen GrasThe 735*62da0113SBen Gras.Nm 736*62da0113SBen Grasfunctionality was implemented in 737*62da0113SBen Gras.Nx 1.3 738*62da0113SBen Grasand later releases by Luke Mewburn, based on work by Simon Burge. 739