2003-01-28 05:49:45 -05:00
|
|
|
\chapter{FTP Server}\label{cha:ftpd}
|
2002-02-12 06:50:54 -05:00
|
|
|
|
2003-01-23 04:38:44 -05:00
|
|
|
The \ex{ftpd} structure contains a complete anonymous ftp server.
|
2002-02-12 06:50:54 -05:00
|
|
|
|
2003-01-23 04:38:44 -05:00
|
|
|
\defun{ftpd}{options}{\noreturn}
|
|
|
|
\defunx{ftp-inetd}{options}{\noreturn}
|
|
|
|
\begin{desc}
|
|
|
|
\ex{Ftpd} starts the server, using \var{anonymous-home} as the
|
|
|
|
root directory of the server.
|
|
|
|
|
|
|
|
\ex{ftpd-inetd} is the version to be used from \ex{inetd}.
|
|
|
|
\ex{Ftpd-inetd} handles the connection through the current standard
|
|
|
|
output and input ports.
|
|
|
|
\end{desc}
|
|
|
|
%
|
|
|
|
The \var{options} argument can be constructed through a number of
|
|
|
|
procedures with names of the form \texttt{with-\ldots}. Each of these
|
|
|
|
procedures either creates a fresh options value or adds a
|
|
|
|
configuration parameter to an old options argument. The configuration
|
|
|
|
parameter value is always the first argument, the (old) options value
|
|
|
|
the optional second one. Here they are:
|
|
|
|
|
|
|
|
\defun{with-port}{port [options]}{options}
|
|
|
|
\begin{desc}
|
|
|
|
This specifies the port on which the server listens. Defaults to 21.
|
|
|
|
\end{desc}
|
|
|
|
|
|
|
|
\defun{with-anonymous-home}{string [options]}{options}
|
|
|
|
\begin{desc}
|
|
|
|
This specifies the home directory for anonymous logins. Defaults to
|
|
|
|
\verb|"~ftp"|.
|
|
|
|
\end{desc}
|
|
|
|
|
|
|
|
\defun{with-banner}{list [options]}{options}
|
|
|
|
\begin{desc}
|
|
|
|
This specifies an alternative greeting banner for those members of
|
|
|
|
the Untergrund who prefer to remain covert. The banner is
|
|
|
|
represented as a list of strings, one for each line of output.
|
|
|
|
\end{desc}
|
|
|
|
|
2003-01-28 05:49:45 -05:00
|
|
|
\defun{with-log-port}{output-port [options]}{options}
|
2003-01-23 04:38:44 -05:00
|
|
|
\begin{desc}
|
2003-01-28 05:49:45 -05:00
|
|
|
If this is non-\sharpf, ex{ftpd} outputs a log entry for each file
|
|
|
|
sent or retrieved on \var{output-port}. Defaults to \sharpf.
|
2003-01-23 04:38:44 -05:00
|
|
|
\end{desc}
|
|
|
|
|
|
|
|
\defun{with-dns-lookup?}{boolean [options]}{options}
|
|
|
|
\begin{desc}
|
|
|
|
If \var{dns-lookup?} is \sharpt, the log file will contain the host
|
|
|
|
names instead of their IP addresses. If \var{dns-lookup?} is \sharpf,
|
|
|
|
the log will only contain IP addresses. Defaults to \sharpf.
|
|
|
|
\end{desc}
|
|
|
|
|
|
|
|
The log format of \ex{ftpd} is the same as the one of
|
|
|
|
\ex{wuftpd}. The entries look like this:
|
|
|
|
%
|
|
|
|
\begin{verbatim}
|
|
|
|
Fri Apr 19 17:08:14 2002 4 134.2.2.171 56881 /files.lst b _ i a nop@ssword ftp 0 *
|
|
|
|
\end{verbatim}
|
|
|
|
%
|
|
|
|
These are the fields:
|
|
|
|
\begin{enumerate}
|
2002-04-19 11:50:06 -04:00
|
|
|
\item Current date and time. This field contains
|
|
|
|
spaces and is 24 characters long.
|
|
|
|
\item Transfer time in seconds.
|
2003-01-23 04:38:44 -05:00
|
|
|
\item Remote host IP (wu-ftpd puts the name here).
|
2002-04-19 11:50:06 -04:00
|
|
|
\item File size in bytes
|
2002-04-21 13:54:34 -04:00
|
|
|
\item Name of file (spaces are converted to underscores)
|
2002-04-19 11:50:06 -04:00
|
|
|
\item Transfer type: \underline{a}scii or \underline{b}inary (image type).
|
|
|
|
\item Special action flags. As \ex{ftpd} does not support any special
|
2003-01-23 04:38:44 -05:00
|
|
|
action, it always has \ex{\_} here.
|
2002-04-19 11:50:06 -04:00
|
|
|
\item File was sent to user (\underline{o}utgoing) or received from user
|
|
|
|
(\underline{i}ncoming)
|
|
|
|
\item \underline{A}nonymous access
|
2003-01-23 04:38:44 -05:00
|
|
|
\item Anonymous ftp password.
|
|
|
|
\item Service name---always \ex{ftp}.
|
|
|
|
\item Authentication mode (always ``none'' = `\ex{0}').
|
|
|
|
\item Authenticated user ID (always ``not available'' = `\ex{*}')
|
2002-04-19 11:50:06 -04:00
|
|
|
\end{enumerate}
|
|
|
|
|
2003-01-23 04:38:44 -05:00
|
|
|
The server also writes log information to the syslog facility.
|
|
|
|
The following syslog levels occur in the output:
|
2002-02-12 06:50:54 -05:00
|
|
|
\begin{description}
|
2003-01-23 04:38:44 -05:00
|
|
|
\item[\ex{notice}]
|
2002-02-12 06:50:54 -05:00
|
|
|
\begin{itemize}
|
2003-01-23 04:38:44 -05:00
|
|
|
\item messages concerning \emph{connections} (establishing connection,
|
2002-02-12 06:50:54 -05:00
|
|
|
connection refused, closing connection due to timeout, etc.)
|
2003-01-23 04:38:44 -05:00
|
|
|
\item the execution of the \ex{STOR} command\\
|
|
|
|
Its success (\ie
|
2002-02-12 06:50:54 -05:00
|
|
|
somebody is putting something on your server via ftp, also known as
|
2003-01-23 04:38:44 -05:00
|
|
|
\ex{PUT}) is also logged at \ex{notice}.
|
|
|
|
\item internal errors
|
2002-02-12 06:50:54 -05:00
|
|
|
\item Unix errors
|
2003-01-23 04:38:44 -05:00
|
|
|
\item reaching of actually unreachable case branches
|
2002-02-12 06:50:54 -05:00
|
|
|
\end{itemize}
|
2003-01-23 04:38:44 -05:00
|
|
|
\item[\ex{info}] Messages concerning all other commands,
|
2002-02-12 06:50:54 -05:00
|
|
|
including the \ex{RETR} command.
|
2003-01-23 04:38:44 -05:00
|
|
|
\item[\ex{debug}] all other messages, including debug messages
|
2002-02-12 06:50:54 -05:00
|
|
|
\end{description}
|
|
|
|
|
|
|
|
%%% Local Variables:
|
|
|
|
%%% mode: latex
|
2003-01-10 08:30:18 -05:00
|
|
|
%%% TeX-master: "man"
|
2002-02-12 06:50:54 -05:00
|
|
|
%%% End:
|