glfs/server/major/vsftpd.xml
Randy McMurchy 5254d12fef Standardized the id tag name of the Bootscripts package
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@5497 af4574ff-66df-0310-9fd7-8a98e5e911e0
2005-12-29 01:38:36 +00:00

219 lines
7.3 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY vsftpd-download-http " ">
<!ENTITY vsftpd-download-ftp "ftp://vsftpd.beasts.org/users/cevans/vsftpd-&vsftpd-version;.tar.gz">
<!ENTITY vsftpd-md5sum "74936cbd8e8251deb1cd99c5fb18b6f8">
<!ENTITY vsftpd-size "150 KB">
<!ENTITY vsftpd-buildsize "1.4 MB">
<!ENTITY vsftpd-time "less than 0.1 SBU">
]>
<sect1 id="vsftpd" xreflabel="vsFTPD-&vsftpd-version;">
<?dbhtml filename="vsftpd.html"?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
<keywordset>
<keyword role="package">vsftpd-&vsftpd-version;.tar</keyword>
<keyword role="ftpdir">vsftpd</keyword>
</keywordset>
</sect1info>
<title>vsFTPD-&vsftpd-version;</title>
<indexterm zone="vsftpd">
<primary sortas="a-vsFTPD">vsFTPD</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to vsFTPD</title>
<para>The <application>vsFTPD</application> package contains a very
secure and very small FTP daemon. This is useful for serving files
over a network.</para>
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>Download (HTTP): <ulink url="&vsftpd-download-http;"/></para>
</listitem>
<listitem>
<para>Download (FTP): <ulink url="&vsftpd-download-ftp;"/></para>
</listitem>
<listitem>
<para>Download MD5 sum: &vsftpd-md5sum;</para>
</listitem>
<listitem>
<para>Download size: &vsftpd-size;</para>
</listitem>
<listitem>
<para>Estimated disk space required: &vsftpd-buildsize;</para>
</listitem>
<listitem>
<para>Estimated build time: &vsftpd-time;</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">vsFTPD Dependencies</bridgehead>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional"><xref linkend="linux-pam"/>,
<xref linkend="openssl"/>, and
<xref linkend="tcpwrappers"/></para>
</sect2>
<sect2 role="installation">
<title>Installation of vsFTPD</title>
<para>For security reasons, running <application>vsFTPD</application>
as an unprivileged user and group is encouraged. Also, a user should be
created to map anonymous users. As the <systemitem
class="username">root</systemitem> user, create the needed directories,
users, and groups with the following commands:</para>
<screen role="root"><userinput>install -v -d -m 0755 /var/ftp/empty &amp;&amp;
install -v -d -m 0755 /home/ftp &amp;&amp;
groupadd -g 47 vsftpd &amp;&amp;
useradd -d /dev/null -c "vsFTPD User" -g vsftpd -s /bin/false \
-u 47 vsftpd &amp;&amp;
groupadd -g 45 ftp &amp;&amp;
useradd -c anonymous_user -d /home/ftp -g ftp -s /bin/false -u 45 ftp</userinput></screen>
<para>Build <application>vsFTPD</application> as an unprivileged user
using the following command:</para>
<screen><userinput>make</userinput></screen>
<para>Once again, become the <systemitem class="username">root</systemitem>
user and install <application>vsFTPD</application> with the following
commands:</para>
<screen><userinput>install -v -m 755 vsftpd /usr/sbin/vsftpd &amp;&amp;
install -v -m 644 vsftpd.8 /usr/share/man/man8 &amp;&amp;
install -v -m 644 vsftpd.conf.5 /usr/share/man/man5 &amp;&amp;
install -v -m 644 vsftpd.conf /etc</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<para><command>install -v -d ...</command>: This creates the
directory that anonymous users will use (<filename
class='directory'>/home/ftp</filename>)
and the directory the daemon will chroot into
(<filename class='directory'>/var/ftp/empty</filename>).</para>
<note>
<para><filename class="directory">/home/ftp</filename> should not be
owned by the user <systemitem class="username">vsftpd</systemitem>,
or the user <systemitem class="username">ftp</systemitem>.</para>
</note>
<para><command>echo "#define VSF_BUILD_TCPWRAPPERS" >>builddefs.h</command>:
Use this prior to <command>make</command> to add support for
<application>tcpwrappers</application>.</para>
<para><command>echo "#define VSF_BUILD_SSL" >>builddefs.h</command>:
Use this prior to <command>make</command> to add support for SSL.</para>
<para><command>install -v -m ...</command>:
The <filename>Makefile</filename> uses non-standard installation paths.
These commands install the files in
<filename class='directory'>/usr</filename> and
<filename class='directory'>/etc</filename>.</para>
</sect2>
<sect2 role="configuration">
<title>Configuring vsFTPD</title>
<sect3 id="vsftpd-config">
<title>Config Files</title>
<para><filename>/etc/vsftpd.conf</filename></para>
<indexterm zone="vsftpd vsftpd-config">
<primary sortas="e-etc-vsftpd.conf">/etc/vsftpd.conf</primary>
</indexterm>
</sect3>
<sect3>
<title>Configuration Information</title>
<para><application>vsFTPD</application> comes with a basic
anonymous-only configuration file that was copied to
<filename class='directory'>/etc</filename> above. While still as
<systemitem class="username">root</systemitem>, this file should be
modified because it is now recommended to run <command>vsftpd</command>
in standalone mode as opposed to
<command>inetd</command>/<command>xinetd</command> mode. Also, you
should specify the privilege separation user created above. Finally,
you should specify the <command>chroot</command> directory.
<command>man vsftpd.conf</command> will give you all the details.</para>
<screen role="root"><userinput>cat &gt;&gt; /etc/vsftpd.conf &lt;&lt; "EOF"
<literal>background=YES
listen=YES
nopriv_user=vsftpd
secure_chroot_dir=/var/ftp/empty</literal>
EOF</userinput></screen>
</sect3>
<sect3 id="vsftpd-init">
<title>Boot Script</title>
<para>Install the <filename>/etc/rc.d/init.d/vsftpd</filename>
init script included in the
<xref linkend="bootscripts"/> package.</para>
<screen role="root"><userinput>make install-vsftpd</userinput></screen>
</sect3>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Program</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>vsftpd</seg>
<seg>None</seg>
<seg>/var/ftp, /var/ftp/empty, /home/ftp</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="vsftpd-prog">
<term><command>vsftpd</command></term>
<listitem>
<para>is the FTP daemon.</para>
<indexterm zone="vsftpd vsftpd-prog">
<primary sortas="b-vsftpd">vsftpd</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>