\section{FTP server} \begin{description} \item[Used files:] ftpd.scm \item[Name of the package:] ftpd \end{description} \subsection{What users want to know} \subsubsection*{Entry points} \defun {ftpd} {anonymous-home \ovar{port}} {\noreturn} \begin{defundescx}{ftp-inetd} {anonymous-home} {\noreturn} \ex{ftpd} starts the server, using \semvar{anonymous-home} as the root directory of the server. Usage of relative paths is not encouraged. \semvar{port} specifies the port the server is listening for connections. It defaults to 21. As the procedure does not return, you have to do a \ex{fork} in order to have a ``real'' daemon: \codex{(fork (lambda () (ftpd "/data/ftp" 8080)))} \ex{ftpd-inetd} is the version to be used with a daemon like \ex{inetd}. If the server is started this way, it handles the connection through the current standard output and input ports. \end{defundescx} \subsubsection*{Examples} To start the server with the current home directory as root directory and listening on port 8080, use \codex{(ftpd (cwd) 8080)} This is how the ftp server at the computing faculty of the university of Tuebingen\footnote{\texttt{archive.informatik.uni-tuebingen.de}} is started: \begin{code} #!/bin/sh /scsh-0.6-alpha/bin/scsh <