BSD 4_4_Lite1 release
[unix-history] / usr / src / libexec / ftpd / ftpd.8
index ae092de..a7c5cae 100644 (file)
@@ -1,27 +1,51 @@
-.\" Copyright (c) 1985, 1988, 1991 The Regents of the University of California.
-.\" All rights reserved.
+.\" Copyright (c) 1985, 1988, 1991, 1993
+.\"    The Regents of the University of California.  All rights reserved.
 .\"
 .\"
-.\" %sccs.include.redist.man%
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"    This product includes software developed by the University of
+.\"    California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
 .\"
 .\"
-.\"     @(#)ftpd.8     6.10 (Berkeley) %G%
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
 .\"
 .\"
-.Dd 
+.\"     @(#)ftpd.8     8.2 (Berkeley) 4/19/94
+.\"
+.Dd April 19, 1994
 .Dt FTPD 8
 .Os BSD 4.2
 .Sh NAME
 .Nm ftpd
 .Nd
 .Dt FTPD 8
 .Os BSD 4.2
 .Sh NAME
 .Nm ftpd
 .Nd
-.Tn DARPA
 Internet File Transfer Protocol server
 .Sh SYNOPSIS
 .Nm ftpd
 .Op Fl dl
 Internet File Transfer Protocol server
 .Sh SYNOPSIS
 .Nm ftpd
 .Op Fl dl
-.Op Fl t Ar timeout
 .Op Fl T Ar maxtimeout
 .Op Fl T Ar maxtimeout
+.Op Fl t Ar timeout
 .Sh DESCRIPTION
 .Nm Ftpd
 is the
 .Sh DESCRIPTION
 .Nm Ftpd
 is the
-.Tn DARPA
 Internet File Transfer Protocol
 server process.  The server uses the
 .Tn TCP
 Internet File Transfer Protocol
 server process.  The server uses the
 .Tn TCP
@@ -34,15 +58,14 @@ service specification; see
 Available options:
 .Bl -tag -width Ds
 .It Fl d
 Available options:
 .Bl -tag -width Ds
 .It Fl d
-Debugging information is written to the syslog.
+Debugging information is written to the syslog using LOG_FTP.
 .It Fl l
 .It Fl l
-Each
+Each successful and failed 
 .Xr ftp 1
 .Xr ftp 1
-session is logged in the syslog.
-.It Fl t
-The inactivity timeout period is set to
-.Ar timeout
-seconds (the default is 15 minutes).
+session is logged using syslog with a facility of LOG_FTP.
+If this option is specified twice, the retrieve (get), store (put), append,
+delete, make directory, remove directory and rename operations and
+their filename arguments are also logged.
 .It Fl T
 A client may also request a different timeout period;
 the maximum period allowed may be set to
 .It Fl T
 A client may also request a different timeout period;
 the maximum period allowed may be set to
@@ -51,10 +74,33 @@ seconds with the
 .Fl T
 option.
 The default limit is 2 hours.
 .Fl T
 option.
 The default limit is 2 hours.
+.It Fl t
+The inactivity timeout period is set to
+.Ar timeout
+seconds (the default is 15 minutes).
 .El
 .Pp
 .El
 .Pp
-The ftp server currently supports the following ftp
-requests; case is not distinguished.
+The file
+.Pa /etc/nologin
+can be used to disable ftp access.
+If the file exists,
+.Nm
+displays it and exits.
+If the file
+.Pa /etc/ftpwelcome
+exists,
+.Nm
+prints it before issuing the 
+.Dq ready
+message.
+If the file
+.Pa /etc/motd
+exists,
+.Nm
+prints it after a successful login.
+.Pp
+The ftp server currently supports the following ftp requests.
+The case of the requests is ignored.
 .Bl -column "Request" -offset indent
 .It Request Ta "Description"
 .It ABOR Ta "abort previous command"
 .Bl -column "Request" -offset indent
 .It Request Ta "Description"
 .It ABOR Ta "abort previous command"
@@ -105,27 +151,23 @@ SITE request.
 .Pp
 .Bl -column Request -offset indent
 .It Sy Request Ta Sy Description
 .Pp
 .Bl -column Request -offset indent
 .It Sy Request Ta Sy Description
-.It UMASK Ta change umask. Em E.g. SITE UMASK 002
-.It IDLE Ta set idle-timer. Em E.g. SITE IDLE 60
-.It CHMOD Ta change mode of a file. Em E.g.
-SITE CHMOD 755 filename
-.It HELP Ta give help information. Em E.g. SITE HELP
+.It UMASK Ta change umask, e.g. ``SITE UMASK 002''
+.It IDLE Ta set idle-timer, e.g. ``SITE IDLE 60''
+.It CHMOD Ta change mode of a file, e.g. ``SITE CHMOD 755 filename''
+.It HELP Ta give help information.
 .El
 .Pp
 .El
 .Pp
-The remaining ftp requests specified in Internet
-.%T "RFC 959"
+The remaining ftp requests specified in Internet RFC 959
 are
 recognized, but not implemented.
 are
 recognized, but not implemented.
-MDTM and SIZE are not specified in
-.%T "RFC 959" ,
-but will appear in the next updated FTP RFC.
+MDTM and SIZE are not specified in RFC 959, but will appear in the
+next updated FTP RFC.
 .Pp
 The ftp server will abort an active file transfer only when the
 ABOR
 command is preceded by a Telnet "Interrupt Process" (IP)
 signal and a Telnet "Synch" signal in the command Telnet stream,
 .Pp
 The ftp server will abort an active file transfer only when the
 ABOR
 command is preceded by a Telnet "Interrupt Process" (IP)
 signal and a Telnet "Synch" signal in the command Telnet stream,
-as described in Internet
-.%T "RFC 959" .
+as described in Internet RFC 959.
 If a
 STAT
 command is received during a data transfer, preceded by a Telnet IP
 If a
 STAT
 command is received during a data transfer, preceded by a Telnet IP
@@ -144,13 +186,13 @@ authenticates users according to three rules.
 .Pp
 .Bl -enum -offset indent
 .It
 .Pp
 .Bl -enum -offset indent
 .It
-The user name must be in the password data base,
+The login name must be in the password data base,
 .Pa /etc/passwd ,
 .Pa /etc/passwd ,
-and not have a null password.  In this case a password
-must be provided by the client before any file operations
-may be performed.
+and not have a null password.
+In this case a password must be provided by the client before any
+file operations may be performed.
 .It
 .It
-The user name must not appear in the file
+The login name must not appear in the file
 .Pa /etc/ftpusers .
 .It
 The user must have a standard shell returned by 
 .Pa /etc/ftpusers .
 .It
 The user must have a standard shell returned by 
@@ -165,8 +207,8 @@ anonymous ftp account must be present in the password
 file (user
 .Dq ftp ) .
 In this case the user is allowed
 file (user
 .Dq ftp ) .
 In this case the user is allowed
-to log in by specifying any password (by convention this
-is given as the client host's name).
+to log in by specifying any password (by convention an email address for
+the user should be used as the password).
 .El
 .Pp
 In the last case, 
 .El
 .Pp
 In the last case, 
@@ -174,7 +216,7 @@ In the last case,
 takes special measures to restrict the client's access privileges.
 The server performs a 
 .Xr chroot 2
 takes special measures to restrict the client's access privileges.
 The server performs a 
 .Xr chroot 2
-command to the home directory of the
+to the home directory of the
 .Dq ftp
 user.
 In order that system security is not breached, it is recommended
 .Dq ftp
 user.
 In order that system security is not breached, it is recommended
@@ -189,7 +231,7 @@ and unwritable by anyone.
 .It Pa ~ftp/bin
 Make this directory owned by
 .Dq root
 .It Pa ~ftp/bin
 Make this directory owned by
 .Dq root
-and unwritable by anyone.
+and unwritable by anyone (mode 555).
 The program
 .Xr ls 1
 must be present to support the list command.
 The program
 .Xr ls 1
 must be present to support the list command.
@@ -197,7 +239,7 @@ This program should be mode 111.
 .It Pa ~ftp/etc
 Make this directory owned by
 .Dq root
 .It Pa ~ftp/etc
 Make this directory owned by
 .Dq root
-and unwritable by anyone.
+and unwritable by anyone (mode 555).
 The files
 .Xr passwd 5
 and
 The files
 .Xr passwd 5
 and
@@ -208,6 +250,9 @@ command to be able to produce owner names rather than numbers.
 The password field in
 .Xr passwd
 is not used, and should not contain real passwords.
 The password field in
 .Xr passwd
 is not used, and should not contain real passwords.
+The file
+.Pa motd ,
+if present, will be printed after a successful login.
 These files should be mode 444.
 .It Pa ~ftp/pub
 Make this directory mode 777 and owned by
 These files should be mode 444.
 .It Pa ~ftp/pub
 Make this directory mode 777 and owned by
@@ -216,6 +261,17 @@ Guests
 can then place files which are to be accessible via the anonymous
 account in this directory.
 .El
 can then place files which are to be accessible via the anonymous
 account in this directory.
 .El
+.Sh FILES
+.Bl -tag -width /etc/ftpwelcome -compact
+.It Pa /etc/ftpusers
+List of unwelcome/restricted users.
+.It Pa /etc/ftpwelcome
+Welcome notice.
+.It Pa /etc/motd
+Welcome notice after login.
+.It Pa /etc/nologin
+Displayed and access refused.
+.El
 .Sh SEE ALSO
 .Xr ftp 1 ,
 .Xr getusershell 3 ,
 .Sh SEE ALSO
 .Xr ftp 1 ,
 .Xr getusershell 3 ,