2004-06-13 07:57:50 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2005-04-04 04:52:42 +08:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
2004-06-13 07:57:50 +08:00
|
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
|
|
|
|
<!ENTITY proftpd-download-http "http://ftp.proftpd.org/distrib/source/proftpd-&proftpd-version;.tar.bz2">
|
|
|
|
<!ENTITY proftpd-download-ftp "ftp://ftp.proftpd.org/distrib/source/proftpd-&proftpd-version;.tar.bz2">
|
2005-02-13 00:53:54 +08:00
|
|
|
<!ENTITY proftpd-md5sum "5feb4a7348e12faefc25e34fd92efdd6">
|
2004-10-17 10:31:23 +08:00
|
|
|
<!ENTITY proftpd-size "901 KB">
|
|
|
|
<!ENTITY proftpd-buildsize "7.3 MB">
|
2004-06-13 07:57:50 +08:00
|
|
|
<!ENTITY proftpd-time "0.27 SBU">
|
|
|
|
]>
|
|
|
|
|
2003-07-31 08:56:25 +08:00
|
|
|
<sect1 id="proftpd" xreflabel="ProFTPD-&proftpd-version;">
|
2005-05-19 00:48:09 +08:00
|
|
|
<?dbhtml filename="proftpd.html"?>
|
|
|
|
|
|
|
|
<sect1info>
|
|
|
|
<othername>$LastChangedBy$</othername>
|
|
|
|
<date>$Date$</date>
|
|
|
|
</sect1info>
|
|
|
|
|
|
|
|
<title>ProFTPD-&proftpd-version;</title>
|
|
|
|
|
|
|
|
<indexterm zone="proftpd">
|
|
|
|
<primary sortas="a-proftpd">Proftpd</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title>Introduction to ProFTPD</title>
|
|
|
|
|
|
|
|
<para>The <application>ProFTPD</application> package contains a secure
|
|
|
|
and highly configurable FTP daemon. This is useful for serving large
|
|
|
|
file archives over a network.</para>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>Download (HTTP): <ulink url="&proftpd-download-http;"/></para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download (FTP): <ulink url="&proftpd-download-ftp;"/></para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download MD5 sum: &proftpd-md5sum;</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download size: &proftpd-size;</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Estimated disk space required: &proftpd-buildsize;</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Estimated build time: &proftpd-time;</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect3">ProFTPD Dependencies</bridgehead>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
|
|
<para><xref linkend="Linux_PAM"/></para>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of ProFTPD</title>
|
|
|
|
|
|
|
|
<para>For security reasons, you should install
|
|
|
|
<application>ProFTPD</application> using an unprivileged user and group.
|
|
|
|
As the <systemitem class="username">root</systemitem> user:</para>
|
|
|
|
|
2005-06-06 05:06:40 +08:00
|
|
|
<screen role="root"><userinput>groupadd -g 46 proftpd &&
|
2005-01-13 13:20:16 +08:00
|
|
|
useradd -c proftpd -d /home/ftp -g proftpd \
|
2005-06-06 05:06:40 +08:00
|
|
|
-s /usr/lib/proftpd/proftpdshell -u 46 proftpd &&
|
2005-05-19 00:48:09 +08:00
|
|
|
install -v -d -m775 -o proftpd -g proftpd /usr/lib/proftpd &&
|
|
|
|
ln -v -s /bin/false /usr/lib/proftpd/proftpdshell &&
|
|
|
|
echo /usr/lib/proftpd/proftpdshell >> /etc/shells</userinput></screen>
|
2004-06-13 07:57:50 +08:00
|
|
|
|
2005-07-28 00:35:22 +08:00
|
|
|
<para>Install <application>ProFTPD</application> as an unprivileged user by
|
2005-05-19 00:48:09 +08:00
|
|
|
running the following commands:</para>
|
2004-06-13 07:57:50 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<screen><userinput>install_user=proftpd install_group=proftpd \
|
2004-06-18 10:33:33 +08:00
|
|
|
./configure --prefix=/usr --sysconfdir=/etc \
|
|
|
|
--localstatedir=/var/run &&
|
2005-05-19 00:48:09 +08:00
|
|
|
make</userinput></screen>
|
2005-03-09 15:08:08 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
2004-06-13 07:57:50 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<screen role="root"><userinput>make install</userinput></screen>
|
2004-06-13 07:57:50 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
</sect2>
|
2004-06-13 07:57:50 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<sect2 role="commands">
|
|
|
|
<title>Command Explanations</title>
|
2005-03-09 15:08:08 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<para><command>install -v -d -m775 -o proftpd -g proftpd
|
|
|
|
/usr/lib/proftpd</command>: Create the home directory for
|
|
|
|
<application>ProFTPD</application>.</para>
|
2005-03-09 15:08:08 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<para><command>ln -v -s /bin/false /usr/lib/proftpd/proftpdshell</command>:
|
2005-07-28 00:35:22 +08:00
|
|
|
Set the default shell as a link to an invalid shell.</para>
|
2005-03-09 15:08:08 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<para><command>echo /usr/lib/proftpd/proftpdshell >>
|
|
|
|
/etc/shells</command>: Fake a valid shell for compatability purposes.</para>
|
2005-03-09 15:08:08 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<note>
|
|
|
|
<para>The above three commands can be ommitted if the following directive is
|
|
|
|
placed in the configuration file:</para>
|
2005-03-09 15:08:08 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<screen><literal>RequireValidShell off</literal></screen>
|
2005-03-09 15:08:08 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<para>By default, proftpd will require that users logging in have valid
|
|
|
|
shells. The RequireValidShell directive turns off this requirement. This
|
|
|
|
is only recommended if you are setting up your FTP server exclusively
|
|
|
|
for anonymous downloads.</para>
|
|
|
|
</note>
|
2004-06-13 07:57:50 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<para><parameter>install_user=proftpd install_group=proftpd</parameter>:
|
|
|
|
Specify the user and group identity for
|
|
|
|
<application>ProFTPD</application>.</para>
|
2004-06-13 07:57:50 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<para><parameter>--sysconfdir=/etc</parameter>: This prevents the
|
|
|
|
configuration files from going to
|
|
|
|
<filename class="directory">/usr/etc</filename>.</para>
|
2004-06-13 07:57:50 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<para><parameter>--localstatedir=/var/run</parameter>:
|
|
|
|
This uses <filename class="directory">/var/run</filename> instead of
|
|
|
|
<filename class="directory">/usr/var</filename> for lock files.</para>
|
2004-06-13 07:57:50 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
</sect2>
|
2004-06-13 07:57:50 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<sect2 role="configuration">
|
|
|
|
<title>Configuring ProFTPD</title>
|
2005-03-09 15:08:08 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<sect3 id='proftpd-config'>
|
|
|
|
<title>Config Files</title>
|
2005-03-09 15:08:08 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<para><filename>/etc/proftpd.conf</filename></para>
|
2005-03-09 15:08:08 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<indexterm zone="proftpd proftpd-config">
|
|
|
|
<primary sortas="e-etc-proftpd">/etc/proftpd.conf</primary>
|
|
|
|
</indexterm>
|
2004-12-22 09:00:40 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
</sect3>
|
2004-06-13 07:57:50 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<sect3>
|
|
|
|
<title>Configuration Information</title>
|
2004-06-13 07:57:50 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<para>This is a simple, download-only sample configuration. See the
|
|
|
|
<application>ProFTPD</application> documentation in
|
|
|
|
<filename class="directory">/usr/share/doc/proftpd</filename> and
|
|
|
|
consult the website at <ulink url="http://www.proftpd.org/"/> for
|
|
|
|
example configurations.</para>
|
2005-03-09 15:08:08 +08:00
|
|
|
|
2005-05-19 00:48:09 +08:00
|
|
|
<screen role="root"><userinput>cat > /etc/proftpd.conf << "EOF"
|
|
|
|
<literal># This is a basic ProFTPD configuration file
|
2004-06-13 07:57:50 +08:00
|
|
|
# It establishes a single server and a single anonymous login.
|
|
|
|
|
|
|
|
ServerName "ProFTPD Default Installation"
|
|
|
|
ServerType standalone
|
|
|
|
DefaultServer on
|
|
|
|
|
|
|
|
# Port 21 is the standard FTP port.
|
|
|
|
Port 21
|
|
|
|
# Umask 022 is a good standard umask to prevent new dirs and files
|
|
|
|
# from being group and world writable.
|
|
|
|
Umask 022
|
|
|
|
|
|
|
|
# To prevent DoS attacks, set the maximum number of child processes
|
|
|
|
# to 30. If you need to allow more than 30 concurrent connections
|
|
|
|
# at once, simply increase this value. Note that this ONLY works
|
|
|
|
# in standalone mode, in inetd mode you should use an inetd server
|
|
|
|
# that allows you to limit maximum number of processes per service
|
|
|
|
# (such as xinetd)
|
|
|
|
MaxInstances 30
|
|
|
|
|
|
|
|
# Set the user and group that the server normally runs at.
|
|
|
|
User proftpd
|
|
|
|
Group proftpd
|
|
|
|
|
2004-12-22 09:00:40 +08:00
|
|
|
# Normally, files should be overwritable.
|
2004-06-13 07:57:50 +08:00
|
|
|
<Directory /*>
|
|
|
|
AllowOverwrite on
|
|
|
|
</Directory>
|
|
|
|
|
|
|
|
# A basic anonymous configuration, no upload directories.
|
|
|
|
<Anonymous ~proftpd>
|
|
|
|
User proftpd
|
|
|
|
Group proftpd
|
2004-12-22 09:00:40 +08:00
|
|
|
# Clients should be able to login with "anonymous" as well as "proftpd"
|
2004-06-13 07:57:50 +08:00
|
|
|
UserAlias anonymous proftpd
|
|
|
|
|
|
|
|
# Limit the maximum number of anonymous logins
|
|
|
|
MaxClients 10
|
|
|
|
|
2004-12-22 09:00:40 +08:00
|
|
|
# 'welcome.msg' should be displayed at login, and '.message' displayed
|
2004-06-13 07:57:50 +08:00
|
|
|
# in each newly chdired directory.
|
|
|
|
DisplayLogin welcome.msg
|
|
|
|
DisplayFirstChdir .message
|
|
|
|
|
|
|
|
# Limit WRITE everywhere in the anonymous chroot
|
|
|
|
<Limit WRITE>
|
|
|
|
DenyAll
|
|
|
|
</Limit>
|
2005-05-19 00:48:09 +08:00
|
|
|
</Anonymous></literal>
|
|
|
|
EOF</userinput></screen>
|
|
|
|
|
|
|
|
</sect3>
|
|
|
|
|
|
|
|
<sect3 id="proftpd-init">
|
|
|
|
<title>Boot Script</title>
|
|
|
|
|
|
|
|
<para>Install the <filename>/etc/rc.d/init.d/proftpd</filename> init
|
|
|
|
script included in the <xref linkend="intro-important-bootscripts"/>
|
|
|
|
package.</para>
|
|
|
|
|
|
|
|
<indexterm zone="proftpd proftpd-init">
|
|
|
|
<primary sortas="f-proftpd">proftpd</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<screen role="root"><userinput>make install-proftpd</userinput></screen>
|
|
|
|
|
|
|
|
</sect3>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="content">
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed Programs</segtitle>
|
|
|
|
<segtitle>Installed Libraries</segtitle>
|
|
|
|
<segtitle>Installed Directory</segtitle>
|
|
|
|
|
|
|
|
<seglistitem>
|
|
|
|
<seg>ftpcount, ftpdctl, ftptop, ftpwho, ftpshut, proftpd</seg>
|
|
|
|
<seg>None</seg>
|
|
|
|
<seg>/var/run/proftpd</seg>
|
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
|
|
|
<varlistentry id="proftpd-prog">
|
|
|
|
<term><command>proftpd</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>is the FTP daemon.</para>
|
|
|
|
<indexterm zone="proftpd proftpd-prog">
|
|
|
|
<primary sortas="b-proftpd">proftpd</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="ftpcount">
|
|
|
|
<term><command>ftpcount</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>shows the current number of connections.</para>
|
|
|
|
<indexterm zone="proftpd ftpcount">
|
|
|
|
<primary sortas="b-ftpcount">ftpcount</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="ftpshut">
|
|
|
|
<term><command>ftpshut</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>shuts down all <application>proftpd</application> servers
|
|
|
|
at a given time.</para>
|
|
|
|
<indexterm zone="proftpd ftpshut">
|
|
|
|
<primary sortas="b-ftpshut">ftpshut</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="ftptop">
|
|
|
|
<term><command>ftptop</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>displays running status on connections.</para>
|
|
|
|
<indexterm zone="proftpd ftptop">
|
|
|
|
<primary sortas="b-ftptop">ftptop</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="ftpwho">
|
|
|
|
<term><command>ftpwho</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>shows current process information for each session.</para>
|
|
|
|
<indexterm zone="proftpd ftpwho">
|
|
|
|
<primary sortas="b-ftpwho">ftpwho</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
2003-07-31 08:56:25 +08:00
|
|
|
|
|
|
|
</sect1>
|