1ea022d16SRodney W. Grimes.\" Copyright (c) 1985, 1988, 1991, 1993 2ea022d16SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 3ea022d16SRodney W. Grimes.\" 4ea022d16SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 5ea022d16SRodney W. Grimes.\" modification, are permitted provided that the following conditions 6ea022d16SRodney W. Grimes.\" are met: 7ea022d16SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 8ea022d16SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 9ea022d16SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 10ea022d16SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 11ea022d16SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 12ea022d16SRodney W. Grimes.\" 3. All advertising materials mentioning features or use of this software 13ea022d16SRodney W. Grimes.\" must display the following acknowledgement: 14ea022d16SRodney W. Grimes.\" This product includes software developed by the University of 15ea022d16SRodney W. Grimes.\" California, Berkeley and its contributors. 16ea022d16SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors 17ea022d16SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 18ea022d16SRodney W. Grimes.\" without specific prior written permission. 19ea022d16SRodney W. Grimes.\" 20ea022d16SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21ea022d16SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22ea022d16SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23ea022d16SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24ea022d16SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25ea022d16SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26ea022d16SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27ea022d16SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28ea022d16SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29ea022d16SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30ea022d16SRodney W. Grimes.\" SUCH DAMAGE. 31ea022d16SRodney W. Grimes.\" 32ea022d16SRodney W. Grimes.\" @(#)ftpd.8 8.2 (Berkeley) 4/19/94 33ea022d16SRodney W. Grimes.\" 34ea022d16SRodney W. Grimes.Dd April 19, 1994 35ea022d16SRodney W. Grimes.Dt FTPD 8 36ea022d16SRodney W. Grimes.Os BSD 4.2 37ea022d16SRodney W. Grimes.Sh NAME 38ea022d16SRodney W. Grimes.Nm ftpd 39ea022d16SRodney W. Grimes.Nd 40ea022d16SRodney W. GrimesInternet File Transfer Protocol server 41ea022d16SRodney W. Grimes.Sh SYNOPSIS 42ea022d16SRodney W. Grimes.Nm ftpd 43ea022d16SRodney W. Grimes.Op Fl dl 44ea022d16SRodney W. Grimes.Op Fl T Ar maxtimeout 45ea022d16SRodney W. Grimes.Op Fl t Ar timeout 46ea022d16SRodney W. Grimes.Sh DESCRIPTION 47ea022d16SRodney W. Grimes.Nm Ftpd 48ea022d16SRodney W. Grimesis the 49ea022d16SRodney W. GrimesInternet File Transfer Protocol 50ea022d16SRodney W. Grimesserver process. The server uses the 51ea022d16SRodney W. Grimes.Tn TCP 52ea022d16SRodney W. Grimesprotocol 53ea022d16SRodney W. Grimesand listens at the port specified in the 54ea022d16SRodney W. Grimes.Dq ftp 55ea022d16SRodney W. Grimesservice specification; see 56ea022d16SRodney W. Grimes.Xr services 5 . 57ea022d16SRodney W. Grimes.Pp 58ea022d16SRodney W. GrimesAvailable options: 59ea022d16SRodney W. Grimes.Bl -tag -width Ds 60ea022d16SRodney W. Grimes.It Fl d 61ea022d16SRodney W. GrimesDebugging information is written to the syslog using LOG_FTP. 62ea022d16SRodney W. Grimes.It Fl l 63ea022d16SRodney W. GrimesEach successful and failed 64ea022d16SRodney W. Grimes.Xr ftp 1 65ea022d16SRodney W. Grimessession is logged using syslog with a facility of LOG_FTP. 66ea022d16SRodney W. GrimesIf this option is specified twice, the retrieve (get), store (put), append, 67ea022d16SRodney W. Grimesdelete, make directory, remove directory and rename operations and 68ea022d16SRodney W. Grimestheir filename arguments are also logged. 69ea022d16SRodney W. Grimes.It Fl T 70ea022d16SRodney W. GrimesA client may also request a different timeout period; 71ea022d16SRodney W. Grimesthe maximum period allowed may be set to 72ea022d16SRodney W. Grimes.Ar timeout 73ea022d16SRodney W. Grimesseconds with the 74ea022d16SRodney W. Grimes.Fl T 75ea022d16SRodney W. Grimesoption. 76ea022d16SRodney W. GrimesThe default limit is 2 hours. 77ea022d16SRodney W. Grimes.It Fl t 78ea022d16SRodney W. GrimesThe inactivity timeout period is set to 79ea022d16SRodney W. Grimes.Ar timeout 80ea022d16SRodney W. Grimesseconds (the default is 15 minutes). 81ea022d16SRodney W. Grimes.El 82ea022d16SRodney W. Grimes.Pp 83ea022d16SRodney W. GrimesThe file 84ea022d16SRodney W. Grimes.Pa /etc/nologin 85ea022d16SRodney W. Grimescan be used to disable ftp access. 86ea022d16SRodney W. GrimesIf the file exists, 87ea022d16SRodney W. Grimes.Nm 88ea022d16SRodney W. Grimesdisplays it and exits. 89ea022d16SRodney W. GrimesIf the file 90ea022d16SRodney W. Grimes.Pa /etc/ftpwelcome 91ea022d16SRodney W. Grimesexists, 92ea022d16SRodney W. Grimes.Nm 93ea022d16SRodney W. Grimesprints it before issuing the 94ea022d16SRodney W. Grimes.Dq ready 95ea022d16SRodney W. Grimesmessage. 96ea022d16SRodney W. GrimesIf the file 97ea022d16SRodney W. Grimes.Pa /etc/motd 98ea022d16SRodney W. Grimesexists, 99ea022d16SRodney W. Grimes.Nm 100ea022d16SRodney W. Grimesprints it after a successful login. 101ea022d16SRodney W. Grimes.Pp 102ea022d16SRodney W. GrimesThe ftp server currently supports the following ftp requests. 103ea022d16SRodney W. GrimesThe case of the requests is ignored. 104ea022d16SRodney W. Grimes.Bl -column "Request" -offset indent 105ea022d16SRodney W. Grimes.It Request Ta "Description" 106ea022d16SRodney W. Grimes.It ABOR Ta "abort previous command" 107ea022d16SRodney W. Grimes.It ACCT Ta "specify account (ignored)" 108ea022d16SRodney W. Grimes.It ALLO Ta "allocate storage (vacuously)" 109ea022d16SRodney W. Grimes.It APPE Ta "append to a file" 110ea022d16SRodney W. Grimes.It CDUP Ta "change to parent of current working directory" 111ea022d16SRodney W. Grimes.It CWD Ta "change working directory" 112ea022d16SRodney W. Grimes.It DELE Ta "delete a file" 113ea022d16SRodney W. Grimes.It HELP Ta "give help information" 114ea022d16SRodney W. Grimes.It LIST Ta "give list files in a directory" Pq Dq Li "ls -lgA" 115ea022d16SRodney W. Grimes.It MKD Ta "make a directory" 116ea022d16SRodney W. Grimes.It MDTM Ta "show last modification time of file" 117ea022d16SRodney W. Grimes.It MODE Ta "specify data transfer" Em mode 118ea022d16SRodney W. Grimes.It NLST Ta "give name list of files in directory" 119ea022d16SRodney W. Grimes.It NOOP Ta "do nothing" 120ea022d16SRodney W. Grimes.It PASS Ta "specify password" 121ea022d16SRodney W. Grimes.It PASV Ta "prepare for server-to-server transfer" 122ea022d16SRodney W. Grimes.It PORT Ta "specify data connection port" 123ea022d16SRodney W. Grimes.It PWD Ta "print the current working directory" 124ea022d16SRodney W. Grimes.It QUIT Ta "terminate session" 125ea022d16SRodney W. Grimes.It REST Ta "restart incomplete transfer" 126ea022d16SRodney W. Grimes.It RETR Ta "retrieve a file" 127ea022d16SRodney W. Grimes.It RMD Ta "remove a directory" 128ea022d16SRodney W. Grimes.It RNFR Ta "specify rename-from file name" 129ea022d16SRodney W. Grimes.It RNTO Ta "specify rename-to file name" 130ea022d16SRodney W. Grimes.It SITE Ta "non-standard commands (see next section)" 131ea022d16SRodney W. Grimes.It SIZE Ta "return size of file" 132ea022d16SRodney W. Grimes.It STAT Ta "return status of server" 133ea022d16SRodney W. Grimes.It STOR Ta "store a file" 134ea022d16SRodney W. Grimes.It STOU Ta "store a file with a unique name" 135ea022d16SRodney W. Grimes.It STRU Ta "specify data transfer" Em structure 136ea022d16SRodney W. Grimes.It SYST Ta "show operating system type of server system" 137ea022d16SRodney W. Grimes.It TYPE Ta "specify data transfer" Em type 138ea022d16SRodney W. Grimes.It USER Ta "specify user name" 139ea022d16SRodney W. Grimes.It XCUP Ta "change to parent of current working directory (deprecated)" 140ea022d16SRodney W. Grimes.It XCWD Ta "change working directory (deprecated)" 141ea022d16SRodney W. Grimes.It XMKD Ta "make a directory (deprecated)" 142ea022d16SRodney W. Grimes.It XPWD Ta "print the current working directory (deprecated)" 143ea022d16SRodney W. Grimes.It XRMD Ta "remove a directory (deprecated)" 144ea022d16SRodney W. Grimes.El 145ea022d16SRodney W. Grimes.Pp 146ea022d16SRodney W. GrimesThe following non-standard or 147ea022d16SRodney W. Grimes.Tn UNIX 148ea022d16SRodney W. Grimesspecific commands are supported 149ea022d16SRodney W. Grimesby the 150ea022d16SRodney W. GrimesSITE request. 151ea022d16SRodney W. Grimes.Pp 152ea022d16SRodney W. Grimes.Bl -column Request -offset indent 153ea022d16SRodney W. Grimes.It Sy Request Ta Sy Description 154ea022d16SRodney W. Grimes.It UMASK Ta change umask, e.g. ``SITE UMASK 002'' 155ea022d16SRodney W. Grimes.It IDLE Ta set idle-timer, e.g. ``SITE IDLE 60'' 156ea022d16SRodney W. Grimes.It CHMOD Ta change mode of a file, e.g. ``SITE CHMOD 755 filename'' 157ea022d16SRodney W. Grimes.It HELP Ta give help information. 158ea022d16SRodney W. Grimes.El 159ea022d16SRodney W. Grimes.Pp 160ea022d16SRodney W. GrimesThe remaining ftp requests specified in Internet RFC 959 161ea022d16SRodney W. Grimesare 162ea022d16SRodney W. Grimesrecognized, but not implemented. 163ea022d16SRodney W. GrimesMDTM and SIZE are not specified in RFC 959, but will appear in the 164ea022d16SRodney W. Grimesnext updated FTP RFC. 165ea022d16SRodney W. Grimes.Pp 166ea022d16SRodney W. GrimesThe ftp server will abort an active file transfer only when the 167ea022d16SRodney W. GrimesABOR 168ea022d16SRodney W. Grimescommand is preceded by a Telnet "Interrupt Process" (IP) 169ea022d16SRodney W. Grimessignal and a Telnet "Synch" signal in the command Telnet stream, 170ea022d16SRodney W. Grimesas described in Internet RFC 959. 171ea022d16SRodney W. GrimesIf a 172ea022d16SRodney W. GrimesSTAT 173ea022d16SRodney W. Grimescommand is received during a data transfer, preceded by a Telnet IP 174ea022d16SRodney W. Grimesand Synch, transfer status will be returned. 175ea022d16SRodney W. Grimes.Pp 176ea022d16SRodney W. Grimes.Nm Ftpd 177ea022d16SRodney W. Grimesinterprets file names according to the 178ea022d16SRodney W. Grimes.Dq globbing 179ea022d16SRodney W. Grimesconventions used by 180ea022d16SRodney W. Grimes.Xr csh 1 . 181ea022d16SRodney W. GrimesThis allows users to utilize the metacharacters 182ea022d16SRodney W. Grimes.Dq Li \&*?[]{}~ . 183ea022d16SRodney W. Grimes.Pp 184ea022d16SRodney W. Grimes.Nm Ftpd 185ea022d16SRodney W. Grimesauthenticates users according to three rules. 186ea022d16SRodney W. Grimes.Pp 187ea022d16SRodney W. Grimes.Bl -enum -offset indent 188ea022d16SRodney W. Grimes.It 189ea022d16SRodney W. GrimesThe login name must be in the password data base, 190ea022d16SRodney W. Grimes.Pa /etc/passwd , 191ea022d16SRodney W. Grimesand not have a null password. 192ea022d16SRodney W. GrimesIn this case a password must be provided by the client before any 193ea022d16SRodney W. Grimesfile operations may be performed. 194ea022d16SRodney W. Grimes.It 195ea022d16SRodney W. GrimesThe login name must not appear in the file 196ea022d16SRodney W. Grimes.Pa /etc/ftpusers . 197ea022d16SRodney W. Grimes.It 198ea022d16SRodney W. GrimesThe user must have a standard shell returned by 199ea022d16SRodney W. Grimes.Xr getusershell 3 . 200ea022d16SRodney W. Grimes.It 201ea022d16SRodney W. GrimesIf the user name is 202ea022d16SRodney W. Grimes.Dq anonymous 203ea022d16SRodney W. Grimesor 204ea022d16SRodney W. Grimes.Dq ftp , 205ea022d16SRodney W. Grimesan 206ea022d16SRodney W. Grimesanonymous ftp account must be present in the password 207ea022d16SRodney W. Grimesfile (user 208ea022d16SRodney W. Grimes.Dq ftp ) . 209ea022d16SRodney W. GrimesIn this case the user is allowed 210ea022d16SRodney W. Grimesto log in by specifying any password (by convention an email address for 211ea022d16SRodney W. Grimesthe user should be used as the password). 212ea022d16SRodney W. Grimes.El 213ea022d16SRodney W. Grimes.Pp 214ea022d16SRodney W. GrimesIn the last case, 215ea022d16SRodney W. Grimes.Nm ftpd 216ea022d16SRodney W. Grimestakes special measures to restrict the client's access privileges. 217ea022d16SRodney W. GrimesThe server performs a 218ea022d16SRodney W. Grimes.Xr chroot 2 219ea022d16SRodney W. Grimesto the home directory of the 220ea022d16SRodney W. Grimes.Dq ftp 221ea022d16SRodney W. Grimesuser. 222ea022d16SRodney W. GrimesIn order that system security is not breached, it is recommended 223ea022d16SRodney W. Grimesthat the 224ea022d16SRodney W. Grimes.Dq ftp 225ea022d16SRodney W. Grimessubtree be constructed with care, following these rules: 226ea022d16SRodney W. Grimes.Bl -tag -width "~ftp/pub" -offset indent 227ea022d16SRodney W. Grimes.It Pa ~ftp 228ea022d16SRodney W. GrimesMake the home directory owned by 229ea022d16SRodney W. Grimes.Dq root 230ea022d16SRodney W. Grimesand unwritable by anyone. 231ea022d16SRodney W. Grimes.It Pa ~ftp/bin 232ea022d16SRodney W. GrimesMake this directory owned by 233ea022d16SRodney W. Grimes.Dq root 234ea022d16SRodney W. Grimesand unwritable by anyone (mode 555). 235ea022d16SRodney W. GrimesThe program 236ea022d16SRodney W. Grimes.Xr ls 1 237ea022d16SRodney W. Grimesmust be present to support the list command. 238ea022d16SRodney W. GrimesThis program should be mode 111. 239ea022d16SRodney W. Grimes.It Pa ~ftp/etc 240ea022d16SRodney W. GrimesMake this directory owned by 241ea022d16SRodney W. Grimes.Dq root 242ea022d16SRodney W. Grimesand unwritable by anyone (mode 555). 243ea022d16SRodney W. GrimesThe files 244ea022d16SRodney W. Grimes.Xr passwd 5 245ea022d16SRodney W. Grimesand 246ea022d16SRodney W. Grimes.Xr group 5 247ea022d16SRodney W. Grimesmust be present for the 248ea022d16SRodney W. Grimes.Xr ls 249ea022d16SRodney W. Grimescommand to be able to produce owner names rather than numbers. 250ea022d16SRodney W. GrimesThe password field in 251ea022d16SRodney W. Grimes.Xr passwd 252ea022d16SRodney W. Grimesis not used, and should not contain real passwords. 253ea022d16SRodney W. GrimesThe file 254ea022d16SRodney W. Grimes.Pa motd , 255ea022d16SRodney W. Grimesif present, will be printed after a successful login. 256ea022d16SRodney W. GrimesThese files should be mode 444. 257ea022d16SRodney W. Grimes.It Pa ~ftp/pub 258ea022d16SRodney W. GrimesMake this directory mode 777 and owned by 259ea022d16SRodney W. Grimes.Dq ftp . 260ea022d16SRodney W. GrimesGuests 261ea022d16SRodney W. Grimescan then place files which are to be accessible via the anonymous 262ea022d16SRodney W. Grimesaccount in this directory. 263ea022d16SRodney W. Grimes.El 264ea022d16SRodney W. Grimes.Sh FILES 265ea022d16SRodney W. Grimes.Bl -tag -width /etc/ftpwelcome -compact 266ea022d16SRodney W. Grimes.It Pa /etc/ftpusers 267ea022d16SRodney W. GrimesList of unwelcome/restricted users. 268ea022d16SRodney W. Grimes.It Pa /etc/ftpwelcome 269ea022d16SRodney W. GrimesWelcome notice. 270ea022d16SRodney W. Grimes.It Pa /etc/motd 271ea022d16SRodney W. GrimesWelcome notice after login. 272ea022d16SRodney W. Grimes.It Pa /etc/nologin 273ea022d16SRodney W. GrimesDisplayed and access refused. 274ea022d16SRodney W. Grimes.El 275ea022d16SRodney W. Grimes.Sh SEE ALSO 276ea022d16SRodney W. Grimes.Xr ftp 1 , 277ea022d16SRodney W. Grimes.Xr getusershell 3 , 278ea022d16SRodney W. Grimes.Xr syslogd 8 279ea022d16SRodney W. Grimes.Sh BUGS 280ea022d16SRodney W. GrimesThe server must run as the super-user 281ea022d16SRodney W. Grimesto create sockets with privileged port numbers. It maintains 282ea022d16SRodney W. Grimesan effective user id of the logged in user, reverting to 283ea022d16SRodney W. Grimesthe super-user only when binding addresses to sockets. The 284ea022d16SRodney W. Grimespossible security holes have been extensively 285ea022d16SRodney W. Grimesscrutinized, but are possibly incomplete. 286ea022d16SRodney W. Grimes.Sh HISTORY 287ea022d16SRodney W. GrimesThe 288ea022d16SRodney W. Grimes.Nm 289ea022d16SRodney W. Grimescommand appeared in 290ea022d16SRodney W. Grimes.Bx 4.2 . 291