1*41ce3b17Snaddy.\" $OpenBSD: ftpd.8,v 1.77 2022/03/31 17:27:18 naddy Exp $ 2fd3ac3abSderaadt.\" $NetBSD: ftpd.8,v 1.8 1996/01/14 20:55:23 thorpej Exp $ 3df930be7Sderaadt.\" 4df930be7Sderaadt.\" Copyright (c) 1985, 1988, 1991, 1993 5df930be7Sderaadt.\" The Regents of the University of California. All rights reserved. 6df930be7Sderaadt.\" 7df930be7Sderaadt.\" Redistribution and use in source and binary forms, with or without 8df930be7Sderaadt.\" modification, are permitted provided that the following conditions 9df930be7Sderaadt.\" are met: 10df930be7Sderaadt.\" 1. Redistributions of source code must retain the above copyright 11df930be7Sderaadt.\" notice, this list of conditions and the following disclaimer. 12df930be7Sderaadt.\" 2. Redistributions in binary form must reproduce the above copyright 13df930be7Sderaadt.\" notice, this list of conditions and the following disclaimer in the 14df930be7Sderaadt.\" documentation and/or other materials provided with the distribution. 15e33d3bd3Smillert.\" 3. Neither the name of the University nor the names of its contributors 16df930be7Sderaadt.\" may be used to endorse or promote products derived from this software 17df930be7Sderaadt.\" without specific prior written permission. 18df930be7Sderaadt.\" 19df930be7Sderaadt.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20df930be7Sderaadt.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21df930be7Sderaadt.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22df930be7Sderaadt.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23df930be7Sderaadt.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24df930be7Sderaadt.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25df930be7Sderaadt.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26df930be7Sderaadt.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27df930be7Sderaadt.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28df930be7Sderaadt.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29df930be7Sderaadt.\" SUCH DAMAGE. 30df930be7Sderaadt.\" 31df930be7Sderaadt.\" @(#)ftpd.8 8.2 (Berkeley) 4/19/94 32df930be7Sderaadt.\" 33*41ce3b17Snaddy.Dd $Mdocdate: March 31 2022 $ 34df930be7Sderaadt.Dt FTPD 8 35fc8533a3Saaron.Os 36df930be7Sderaadt.Sh NAME 37df930be7Sderaadt.Nm ftpd 3880e4ee38Smpech.Nd Internet File Transfer Protocol server 39df930be7Sderaadt.Sh SYNOPSIS 40df930be7Sderaadt.Nm ftpd 4105312c4aSajacoutot.Op Fl 46ADdlMnPSUW 426c941f8bSsthen.Op Fl m Ar minuid 43df930be7Sderaadt.Op Fl T Ar maxtimeout 44df930be7Sderaadt.Op Fl t Ar timeout 45eb00e388Sdownsj.Op Fl u Ar mask 46df930be7Sderaadt.Sh DESCRIPTION 472e1f860aSaaron.Nm 482e1f860aSaaronis the Internet File Transfer Protocol server process. 4912bc6069SschwarzeThe server uses the TCP protocol 50df930be7Sderaadtand listens at the port specified in the 51df930be7Sderaadt.Dq ftp 52df930be7Sderaadtservice specification; see 53df930be7Sderaadt.Xr services 5 . 54df930be7Sderaadt.Pp 552e1f860aSaaronThe options are as follows: 56df930be7Sderaadt.Bl -tag -width Ds 5789dc75a8Sjmc.It Fl 4 5889dc75a8SjmcWhen 5989dc75a8Sjmc.Fl D 6089dc75a8Sjmcis specified, forces 6189dc75a8Sjmc.Nm 6289dc75a8Sjmcto use IPv4 addresses only. 6389dc75a8Sjmc.It Fl 6 6489dc75a8SjmcWhen 6589dc75a8Sjmc.Fl D 6689dc75a8Sjmcis specified, forces 6789dc75a8Sjmc.Nm 6889dc75a8Sjmcto use IPv6 addresses only. 690a04bae7Sderaadt.It Fl A 70d4d12de4SjmcPermit only anonymous FTP connections 71d5bfb54aSjmc(unless the 72d5bfb54aSjmc.Fl n 73d5bfb54aSjmcoption is specified), 74d5bfb54aSjmcaccounts listed in 75fed231abSmillert.Pa /etc/ftpchroot 76fed231abSmillertor users in a login class with the 77fed231abSmillert.Dq ftp-chroot 78ab6e962dSmillertvariable set (see below). 790a04bae7SderaadtOther connection attempts are refused. 8027444405Sdownsj.It Fl D 8127444405SdownsjWith this option set, 822e1f860aSaaron.Nm 8327444405Sdownsjwill detach and become a daemon, accepting connections on the FTP port and 842e1f860aSaaronforking child processes to handle them. 852e1f860aSaaronThis has lower overhead than starting 862e1f860aSaaron.Nm 8727444405Sdownsjfrom 8827444405Sdownsj.Xr inetd 8 8927444405Sdownsjand is thus useful on busy servers to reduce load. 9089dc75a8Sjmc.It Fl d 9189dc75a8SjmcDebugging information is written to the syslog using 9289dc75a8Sjmc.Dv LOG_FTP . 93df930be7Sderaadt.It Fl l 94df930be7SderaadtEach successful and failed 95d4d12de4SjmcFTP session is logged using syslog with a facility of 9689dc75a8Sjmc.Dv LOG_FTP . 97df930be7SderaadtIf this option is specified twice, the retrieve (get), store (put), append, 98df930be7Sderaadtdelete, make directory, remove directory and rename operations and 99df930be7Sderaadttheir filename arguments are also logged. 1000c7232c3Sdownsj.It Fl M 1012e1f860aSaaronEnables multihomed mode. 1022e1f860aSaaronInstead of simply using 1030c7232c3Sdownsj.Pa ~ftp 104cc934dcdSdownsjfor anonymous transfers, a directory matching the fully qualified name of 105cc934dcdSdownsjthe IP number the client connected to, and located inside 1063f397614Sjmc.Pa ~ftp , 1070c7232c3Sdownsjis used instead. 108d1d06d59Sjmc.It Fl m Ar minuid 109d1d06d59SjmcDisallow login to user accounts with a UID below 110d1d06d59Sjmc.Ar minuid . 111d1d06d59SjmcThe default is 1000, to prevent access to administrative and daemon accounts. 112d1d06d59SjmcAnonymous access is allowed even if the UID of the FTP user is smaller than 113d1d06d59Sjmc.Ar minuid . 1147a6ccb19Sderaadt.It Fl n 115d4d12de4SjmcDo not permit anonymous FTP logins. 1163c83a590SmpechNormally they are permitted. 117fc12f3acSderaadt.It Fl P 118fc12f3acSderaadtPermit illegal port numbers or addresses for PORT command initiated connects. 119fc12f3acSderaadtBy default 1203ba2f9e4Sjmc.Nm 121fc12f3acSderaadtviolates the RFC and thus constrains the PORT command to non-reserved ports 122fc12f3acSderaadtand requires it use the same source address as the connection came from. 123fc12f3acSderaadtThis prevents the "FTP bounce attack" against services on both the local 124fc12f3acSderaadtmachine and other local machines. 12572fc7920Sdownsj.It Fl S 12672fc7920SdownsjWith this option set, 1272e1f860aSaaron.Nm 1286cde8390Sdownsjlogs all anonymous downloads to the file 12972fc7920Sdownsj.Pa /var/log/ftpd 13072fc7920Sdownsjwhen this file exists. 131b24688ffSderaadt.It Fl T Ar maxtimeout 132df930be7SderaadtA client may also request a different timeout period; 133df930be7Sderaadtthe maximum period allowed may be set to 134b24688ffSderaadt.Ar maxtimeout 135df930be7Sderaadtseconds with the 136df930be7Sderaadt.Fl T 137df930be7Sderaadtoption. 138df930be7SderaadtThe default limit is 2 hours. 139b24688ffSderaadt.It Fl t Ar timeout 140df930be7SderaadtThe inactivity timeout period is set to 141df930be7Sderaadt.Ar timeout 142df930be7Sderaadtseconds (the default is 15 minutes). 14389dc75a8Sjmc.It Fl U 14489dc75a8SjmcEach concurrent 145d4d12de4SjmcFTP session is logged to the file 14689dc75a8Sjmc.Pa /var/run/utmp , 14789dc75a8Sjmcmaking them visible to commands such as 14889dc75a8Sjmc.Xr who 1 . 14905312c4aSajacoutot.Fl U 15005312c4aSajacoutotand 15105312c4aSajacoutot.Fl W 15205312c4aSajacoutotare mutually exclusive. 153b24688ffSderaadt.It Fl u Ar mask 154b3f5c309SderaadtForce the umask to 1554332f3faSjmc.Ar mask , 156df8feab0Smillertinstead of the default specified in 157df8feab0Smillert.Pa /etc/login.conf 158df8feab0Smillert(usually 022). 1592e1f860aSaaronAlso disallows chmod. 16005312c4aSajacoutot.It Fl W 16105312c4aSajacoutotDo not save login records to 162eefc3d09Sajacoutot.Pa /var/log/wtmp . 16305312c4aSajacoutot.Fl W 16405312c4aSajacoutotand 16505312c4aSajacoutot.Fl U 16605312c4aSajacoutotare mutually exclusive. 167df930be7Sderaadt.El 168df930be7Sderaadt.Pp 169df930be7SderaadtThe file 170df930be7Sderaadt.Pa /etc/nologin 171d4d12de4Sjmccan be used to disable FTP access. 172df930be7SderaadtIf the file exists, 173df930be7Sderaadt.Nm 174df930be7Sderaadtdisplays it and exits. 17589dc75a8SjmcNote: this method will disable 17689dc75a8Sjmc.Em all 17789dc75a8Sjmcnon-root logins; see 17889dc75a8Sjmc.Xr login 1 17989dc75a8Sjmcfor further details. 180df930be7SderaadtIf the file 181df930be7Sderaadt.Pa /etc/ftpwelcome 182df930be7Sderaadtexists, 183df930be7Sderaadt.Nm 184df930be7Sderaadtprints it before issuing the 185df930be7Sderaadt.Dq ready 186df930be7Sderaadtmessage. 18760435dbcSmillertIf the welcome file exists 18860435dbcSmillert.Pa ( /etc/motd 18960435dbcSmillertby default), 190df930be7Sderaadt.Nm 1912e1f860aSaaronprints it after a successful login. 1922e1f860aSaaronIf the file 193fabbb162Smillert.Pa .message 194fabbb162Smillertexists in a directory, 195fabbb162Smillert.Nm 196fabbb162Smillertprints it when that directory is entered. 197df930be7Sderaadt.Pp 198d4d12de4SjmcThe FTP server currently supports the following FTP requests. 199df930be7SderaadtThe case of the requests is ignored. 200df930be7Sderaadt.Bl -column "Request" -offset indent 20141db49dbSmillert.It Sy Request Ta Sy Description 202df930be7Sderaadt.It ABOR Ta "abort previous command" 20389dc75a8Sjmc.It ACCT Ta "specify account (not implemented)" 204df930be7Sderaadt.It ALLO Ta "allocate storage (vacuously)" 205df930be7Sderaadt.It APPE Ta "append to a file" 206df930be7Sderaadt.It CDUP Ta "change to parent of current working directory" 207df930be7Sderaadt.It CWD Ta "change working directory" 208df930be7Sderaadt.It DELE Ta "delete a file" 20941db49dbSmillert.It EPRT Ta "specify data connection port" 21089dc75a8Sjmc.It EPSV Ta "prepare for server-to-server transfer" 211df930be7Sderaadt.It HELP Ta "give help information" 21289dc75a8Sjmc.It LIST Ta "give list of files in a directory" Pq Li "ls -lgA" 21341db49dbSmillert.It LPRT Ta "specify data connection port" 21489dc75a8Sjmc.It LPSV Ta "prepare for server-to-server transfer" 215df930be7Sderaadt.It MDTM Ta "show last modification time of file" 21689dc75a8Sjmc.It MKD Ta "make a directory" 217df930be7Sderaadt.It MODE Ta "specify data transfer" Em mode 218df930be7Sderaadt.It NLST Ta "give name list of files in directory" 219df930be7Sderaadt.It NOOP Ta "do nothing" 220df930be7Sderaadt.It PASS Ta "specify password" 221df930be7Sderaadt.It PASV Ta "prepare for server-to-server transfer" 222df930be7Sderaadt.It PORT Ta "specify data connection port" 223df930be7Sderaadt.It PWD Ta "print the current working directory" 224df930be7Sderaadt.It QUIT Ta "terminate session" 22589dc75a8Sjmc.It REIN Ta "reinitialize (not implemented)" 226df930be7Sderaadt.It REST Ta "restart incomplete transfer" 227df930be7Sderaadt.It RETR Ta "retrieve a file" 228df930be7Sderaadt.It RMD Ta "remove a directory" 229df930be7Sderaadt.It RNFR Ta "specify rename-from file name" 230df930be7Sderaadt.It RNTO Ta "specify rename-to file name" 231df930be7Sderaadt.It SITE Ta "non-standard commands (see next section)" 232df930be7Sderaadt.It SIZE Ta "return size of file" 23389dc75a8Sjmc.It SMNT Ta "structure mount (not implemented)" 234df930be7Sderaadt.It STAT Ta "return status of server" 235df930be7Sderaadt.It STOR Ta "store a file" 236df930be7Sderaadt.It STOU Ta "store a file with a unique name" 237df930be7Sderaadt.It STRU Ta "specify data transfer" Em structure 238df930be7Sderaadt.It SYST Ta "show operating system type of server system" 239df930be7Sderaadt.It TYPE Ta "specify data transfer" Em type 24089dc75a8Sjmc.It USER Ta "specify user name; not valid after login" 24189dc75a8Sjmc.It XCUP Ta "change to parent of current working directory (deprec.)" 242df930be7Sderaadt.It XCWD Ta "change working directory (deprecated)" 243df930be7Sderaadt.It XMKD Ta "make a directory (deprecated)" 244df930be7Sderaadt.It XPWD Ta "print the current working directory (deprecated)" 245df930be7Sderaadt.It XRMD Ta "remove a directory (deprecated)" 246df930be7Sderaadt.El 247df930be7Sderaadt.Pp 24812bc6069SschwarzeThe following non-standard or UNIX specific commands 24912bc6069Sschwarzeare supported by the SITE request: 250df930be7Sderaadt.Bl -column Request -offset indent 251df930be7Sderaadt.It Sy Request Ta Sy Description 25289dc75a8Sjmc.It CHMOD Ta "change mode of a file, e.g., SITE CHMOD 755 filename" 25389dc75a8Sjmc.It HELP Ta "give help information" 25489dc75a8Sjmc.It IDLE Ta "set idle-timer, e.g., SITE IDLE 60" 25589dc75a8Sjmc.It UMASK Ta "change umask, e.g., SITE UMASK 002" 256df930be7Sderaadt.El 257df930be7Sderaadt.Pp 258d4d12de4SjmcThe remaining FTP requests specified in Internet RFC 959 are recognized, 25989dc75a8Sjmcbut not implemented. 26017a9ccd3SpascalMDTM and SIZE are specified in RFC 3659. 261df930be7Sderaadt.Pp 262d4d12de4SjmcThe FTP server will abort an active file transfer only when the 263df930be7SderaadtABOR 264df930be7Sderaadtcommand is preceded by a Telnet "Interrupt Process" (IP) 265df930be7Sderaadtsignal and a Telnet "Synch" signal in the command Telnet stream, 266df930be7Sderaadtas described in Internet RFC 959. 267df930be7SderaadtIf a 268df930be7SderaadtSTAT 269df930be7Sderaadtcommand is received during a data transfer, preceded by a Telnet IP 270df930be7Sderaadtand Synch, transfer status will be returned. 271df930be7Sderaadt.Pp 2722e1f860aSaaron.Nm 273df930be7Sderaadtinterprets file names according to the 274df930be7Sderaadt.Dq globbing 275df930be7Sderaadtconventions used by 276df930be7Sderaadt.Xr csh 1 . 277df930be7SderaadtThis allows users to utilize the metacharacters 278df930be7Sderaadt.Dq Li \&*?[]{}~ . 279df930be7Sderaadt.Pp 2802e1f860aSaaron.Nm 28141db49dbSmillertauthenticates users by using the service and type of 28241db49dbSmillert.Ar ftp , 28341db49dbSmillertas defined in the 28441db49dbSmillert.Pa /etc/login.conf 28541db49dbSmillertfile (see 28641db49dbSmillert.Xr login.conf 5 ) . 28741db49dbSmillertAn authentication style 28889dc75a8Sjmcmay be specified by appending with a colon 28989dc75a8Sjmc.Pq Sq :\& 29089dc75a8Sjmcfollowing the authentication style, i.e.\& 29141db49dbSmillert.Dq joe:skey . 29241db49dbSmillertThe allowed authentication styles for 29341db49dbSmillert.Nm 29441db49dbSmillertmay be explicitly specified by the 295478b9898Spvalchev.Dq auth-ftp 29641db49dbSmillertentry in 29741db49dbSmillert.Pa /etc/login.conf . 29841db49dbSmillert.Pp 29941db49dbSmillert.Nm 300d1d06d59Sjmcauthenticates users according to the following rules. 301df930be7Sderaadt.Bl -enum -offset indent 302df930be7Sderaadt.It 303b498a85fSmillertThe login name must be in the password database and not have a null password. 304b498a85fSmillertIn this case a password must be provided by the client before any 305b498a85fSmillertfile operations may be performed. 306df930be7Sderaadt.It 307df930be7SderaadtThe login name must not appear in the file 308df930be7Sderaadt.Pa /etc/ftpusers . 309df930be7Sderaadt.It 310d1d06d59SjmcThe user account must have a UID not less than 3116c941f8bSsthen.Ar minuid . 3126c941f8bSsthen.It 31302f2f9cbSaaronThe user must have a standard shell as described by 31402f2f9cbSaaron.Xr shells 5 . 315df930be7Sderaadt.It 316df930be7SderaadtIf the user name appears in the file 31789dc75a8Sjmc.Pa /etc/ftpchroot , 318e5c6339eSschwarzewhich is a text file containing one user name per line, 319df930be7Sderaadtthe session's root will be changed to the user's login directory by 320df930be7Sderaadt.Xr chroot 2 321df930be7Sderaadtas for an 322df930be7Sderaadt.Dq anonymous 323df930be7Sderaadtor 324df930be7Sderaadt.Dq ftp 3252e1f860aSaaronaccount (see next item). 3262e1f860aSaaronHowever, the user must still supply a password. 327df930be7SderaadtThis feature is intended as a compromise between a fully anonymous account 3282e1f860aSaaronand a fully privileged account. 3292e1f860aSaaronThe account should also be set up as for an anonymous account. 330df930be7Sderaadt.It 331df930be7SderaadtIf the user name is 332df930be7Sderaadt.Dq anonymous 333df930be7Sderaadtor 334df930be7Sderaadt.Dq ftp , 335df930be7Sderaadtan 336d4d12de4Sjmcanonymous FTP account must be present in the password 337df930be7Sderaadtfile (user 338df930be7Sderaadt.Dq ftp ) . 339df930be7SderaadtIn this case the user is allowed 340df930be7Sderaadtto log in by specifying any password (by convention an email address for 341df930be7Sderaadtthe user should be used as the password). 342df930be7Sderaadt.El 343df930be7Sderaadt.Pp 344*41ce3b17SnaddyOnce a user is authenticated, the user must be approved by any approval 34541db49dbSmillertscript defined (see 346bd9e08d2Smpech.Xr login.conf 5 ) . 34741db49dbSmillertIf a valid approval script (by either :approve=...: or :approve-ftp=...: 34841db49dbSmillertfor the user's class) is defined then it is run and must exit with a 0 349bd9e08d2Smpech(success) status. 350bd9e08d2SmpechWhen 35141db49dbSmillert.Nm 35241db49dbSmillertis running under the 35341db49dbSmillert.Fl D 35441db49dbSmillertflag (and debugging is not turned on) then the approval script will be 35541db49dbSmillertcalled with at least the following variables specified via the 35641db49dbSmillert.Fl v 35741db49dbSmillertoption (see 35841db49dbSmillert.Xr login.conf 5 ) 35941db49dbSmillertto the approve script: 36041db49dbSmillert.Bl -column "Variable" -offset indent 36141db49dbSmillert.It Sy Variable Ta Sy Description 36241db49dbSmillert.It FTPD_HOST Ta "The server's (virtual) hostname" 36341db49dbSmillert.El 36441db49dbSmillert.Pp 36541db49dbSmillertFor example (the line is broken to fit the page): 36689dc75a8Sjmc.Bd -literal -offset indent 36789dc75a8Sjmc/usr/libexec/auth/approve_ftpd -v FTPD_HOST=ftp.mycompany.com \e 36889dc75a8Sjmc username class service 36941db49dbSmillert.Ed 37041db49dbSmillert.Pp 371d4d12de4SjmcWhen the user logs in to the anonymous FTP account, 3722e1f860aSaaron.Nm 373df930be7Sderaadttakes special measures to restrict the client's access privileges. 374df930be7SderaadtThe server performs a 375df930be7Sderaadt.Xr chroot 2 376df930be7Sderaadtto the home directory of the 377df930be7Sderaadt.Dq ftp 378df930be7Sderaadtuser. 379df930be7SderaadtIn order that system security is not breached, it is recommended 380df930be7Sderaadtthat the 381df930be7Sderaadt.Dq ftp 382df930be7Sderaadtsubtree be constructed with care, following these rules: 383df930be7Sderaadt.Bl -tag -width "~ftp/pub" -offset indent 384df930be7Sderaadt.It Pa ~ftp 385df930be7SderaadtMake the home directory owned by 386df930be7Sderaadt.Dq root 3876d00e327Smillertand unwritable by anyone (mode 555). 388df930be7Sderaadt.It Pa ~ftp/etc 389df930be7SderaadtMake this directory owned by 390df930be7Sderaadt.Dq root 391ff07684fSmillertand unwritable by anyone (mode 511). 392fd3ac3abSderaadtThe files pwd.db (see 3936d00e327Smillert.Xr pwd_mkdb 8 ) 394df930be7Sderaadtand 395df930be7Sderaadt.Xr group 5 396df930be7Sderaadtmust be present for the 397bd9e08d2Smpech.Xr ls 1 398df930be7Sderaadtcommand to be able to produce owner names rather than numbers. 399df930be7SderaadtThe password field in 400bd9e08d2Smpech.Pa pwd.db 401df930be7Sderaadtis not used, and should not contain real passwords. 402df930be7SderaadtThe file 403df930be7Sderaadt.Pa motd , 404df930be7Sderaadtif present, will be printed after a successful login. 405df930be7SderaadtThese files should be mode 444. 406df930be7Sderaadt.It Pa ~ftp/pub 4076d00e327SmillertMake this directory mode 555 and owned by 4086d00e327Smillert.Dq root . 40941db49dbSmillertThis is traditionally where publicly accessible files are 4106d00e327Smillertstored for download. 411df930be7Sderaadt.El 41218073b49Sdownsj.Pp 41318073b49SdownsjIf logging to the 41418073b49Sdownsj.Pa /var/log/ftpd 41518073b49Sdownsjfile is enabled, information will be written in the following format: 41618073b49Sdownsj.Pp 41718073b49Sdownsj.Bl -tag -width XXXXXXXXXXXXXX -offset indent -compact 41818073b49Sdownsj.It time 41918073b49SdownsjThe time and date of the download, in 42018073b49Sdownsj.Xr ctime 3 42118073b49Sdownsjformat. 42218073b49Sdownsj.It elapsed time 42318073b49SdownsjThe elapsed time, in seconds. 42418073b49Sdownsj.It remote host 42518073b49SdownsjThe remote host (or IP number). 42618073b49Sdownsj.It bytes 42748fe92f8SaaronThe number of bytes transferred. 42818073b49Sdownsj.It path 429d4d12de4SjmcThe full path (relative to the FTP chroot space) of the file transferred. 43018073b49Sdownsj.It type 43118073b49SdownsjThe type of transfer; either 43289dc75a8Sjmc.Sq a 43318073b49Sdownsjfor ASCII or 43489dc75a8Sjmc.Sq b 43518073b49Sdownsjfor binary. 43618073b49Sdownsj.It unused 43718073b49SdownsjUnused field containing a 43889dc75a8Sjmc.Sq * , 43918073b49Sdownsjfor compatibility. 44018073b49Sdownsj.It unused 44189dc75a8SjmcUnused field containing an 44289dc75a8Sjmc.Sq o , 44318073b49Sdownsjfor compatibility. 44418073b49Sdownsj.It user type 44589dc75a8SjmcThe type of user; either 44689dc75a8Sjmc.Sq a 44789dc75a8Sjmcfor anonymous or 44889dc75a8Sjmc.Sq r 44918073b49Sdownsjfor a real user (should always be anonymous). 45018073b49Sdownsj.It name 45118073b49SdownsjEither a system login name or the value given for 45218073b49Sdownsj.Dq email address 45318073b49Sdownsjif an anonymous user. 4541a7997a5Slum.It service name 4551a7997a5SlumThe network service name (always ftp). 45618073b49Sdownsj.It unused 45789dc75a8SjmcUnused field containing a 45889dc75a8Sjmc.Sq 0 , 45918073b49Sdownsjfor compatibility. 46018073b49Sdownsj.It real name 46118073b49SdownsjThe system login name if the connection is not anonymous, or a 46289dc75a8Sjmc.Sq * 46318073b49Sdownsjif it is. 46489dc75a8Sjmc.\" .It virtual host 46589dc75a8Sjmc.\" The virtual host that the connection was made to. 46618073b49Sdownsj.El 46718073b49Sdownsj.Pp 46818073b49SdownsjAlthough fields exist for logging information on real users, this file is 4692e1f860aSaarononly used for anonymous downloads. 470b0a1a34aSaaronUnused fields exist only for compatibility with other 4712e1f860aSaaron.Nm 47218073b49Sdownsjimplementations. 473fed231abSmillert.Sh LOGIN.CONF VARIABLES 474fed231abSmillertThe 475fed231abSmillert.Nm 476d4d12de4Sjmcdaemon uses the following FTP-specific parameters: 477fed231abSmillert.Bl -tag -width ftp-chroot 47841db49dbSmillert.It Pa auth-ftp 47941db49dbSmillertThe list of authentication types available to this class. 48041db49dbSmillertSee 48141db49dbSmillert.Xr login.conf 5 . 482fed231abSmillert.It Pa ftp-chroot 483fed231abSmillertA boolean value. 484e44fe54fSmillertIf set, users in this class will be automatically chrooted to 485e44fe54fSmillertthe user's login directory. 486fed231abSmillert.It Pa ftp-dir 487fed231abSmillertA path to a directory. 488e44fe54fSmillertThis value overrides the login directory for users in this class. 4896f389908SmillertA leading tilde 4906f389908Smillert.Pq Ql ~ 4916f389908Smillertin 4926f389908Smillert.Pa ftp-dir 493e44fe54fSmillertwill be expanded to the user's home directory based on the 494e44fe54fSmillertcontents of the password database. 49560435dbcSmillert.It Pa welcome 49660435dbcSmillertThe path of the file containing the welcome message. 49760435dbcSmillertIf this variable is not set, 49860435dbcSmillert.Pa /etc/motd 49960435dbcSmillertis used. 500fed231abSmillert.El 5018ea584b2Sjakob.Sh PORT ALLOCATION 5028ea584b2SjakobFor passive mode data connections, 5038ea584b2Sjakob.Nm 50489dc75a8Sjmcwill listen to a random high TCP port. 5058ea584b2SjakobThe interval of ports used are configurable using 5068ea584b2Sjakob.Xr sysctl 8 5078ea584b2Sjakobvariables 50889dc75a8Sjmc.Va net.inet.ip.porthifirst 5098ea584b2Sjakoband 51089dc75a8Sjmc.Va net.inet.ip.porthilast . 511df930be7Sderaadt.Sh FILES 512aae42a27Smillert.Bl -tag -width /etc/ftpwelcome -compact 513df930be7Sderaadt.It Pa /etc/ftpchroot 51441db49dbSmillertlist of normal users who should be chrooted 515dcc12a5cSmillert.It Pa /etc/ftpusers 516dcc12a5cSmillertlist of unwelcome/restricted users 517df930be7Sderaadt.It Pa /etc/ftpwelcome 5182e1f860aSaaronwelcome notice 519dcc12a5cSmillert.It Pa /etc/login.conf 520dcc12a5cSmillertauthentication styles 521dcc12a5cSmillert.It Pa /etc/motd 522dcc12a5cSmillertprinted after a successful login 523df930be7Sderaadt.It Pa /etc/nologin 5242e1f860aSaarondisplayed and access refused 52572fc7920Sdownsj.It Pa /var/log/ftpd 5262e1f860aSaaronlog file for anonymous downloads 527eefc3d09Sajacoutot.It Pa /var/log/wtmp 528eefc3d09Sajacoutotlogin account records 529dcc12a5cSmillert.It Pa /var/run/utmp 530dcc12a5cSmillertlist of users on the system 531df930be7Sderaadt.El 532df930be7Sderaadt.Sh SEE ALSO 533df930be7Sderaadt.Xr ftp 1 , 53489dc75a8Sjmc.Xr login 1 , 535df930be7Sderaadt.Xr skey 1 , 536eb00e388Sdownsj.Xr who 1 , 53741db49dbSmillert.Xr chroot 2 , 53889dc75a8Sjmc.Xr ctime 3 , 53989dc75a8Sjmc.Xr group 5 , 54041db49dbSmillert.Xr login.conf 5 , 54189dc75a8Sjmc.Xr motd 5 , 54289dc75a8Sjmc.Xr services 5 , 54302f2f9cbSaaron.Xr shells 5 , 5443f397614Sjmc.Xr ftp-proxy 8 , 54541db49dbSmillert.Xr inetd 8 , 54689dc75a8Sjmc.Xr pwd_mkdb 8 , 54789dc75a8Sjmc.Xr sysctl 8 , 5483f397614Sjmc.Xr syslogd 8 54945c3c1d6Sjmc.Sh STANDARDS 55017a9ccd3Spascal.Rs 55145c3c1d6Sjmc.%A J. Postel 55245c3c1d6Sjmc.%A J. Reynolds 55317a9ccd3Spascal.%D October 1985 55445c3c1d6Sjmc.%R RFC 959 55545c3c1d6Sjmc.%T FILE TRANSFER PROTOCOL (FTP) 55617a9ccd3Spascal.Re 55745c3c1d6Sjmc.Pp 55817a9ccd3Spascal.Rs 55945c3c1d6Sjmc.%A P. Hethmon 56017a9ccd3Spascal.%D March 2007 56145c3c1d6Sjmc.%R RFC 3659 56245c3c1d6Sjmc.%T Extensions to FTP 56317a9ccd3Spascal.Re 564df930be7Sderaadt.Sh HISTORY 565df930be7SderaadtThe 566df930be7Sderaadt.Nm 567df930be7Sderaadtcommand appeared in 568df930be7Sderaadt.Bx 4.2 . 569