SCCS-vsn: libexec/ftpd/ftpd.8 6.11
.\"
.\" %sccs.include.redist.man%
.\"
.\"
.\" %sccs.include.redist.man%
.\"
-.\" @(#)ftpd.8 6.10 (Berkeley) %G%
+.\" @(#)ftpd.8 6.11 (Berkeley) %G%
Internet File Transfer Protocol server
.Sh SYNOPSIS
.Nm ftpd
.Op Fl dl
Internet File Transfer Protocol server
.Sh SYNOPSIS
.Nm ftpd
.Op Fl dl
.Sh DESCRIPTION
.Nm Ftpd
is the
.Sh DESCRIPTION
.Nm Ftpd
is the
Internet File Transfer Protocol
server process. The server uses the
.Tn TCP
Internet File Transfer Protocol
server process. The server uses the
.Tn TCP
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.
+Each successful and failed
-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
.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).
-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 successsful 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"
.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.
-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
.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,
-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.
-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
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,
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
.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.
.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
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 sucessful 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
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 ,