[d7c8734] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[d7c8734] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[12a352e2] | 7 | <!ENTITY vsftpd-download-http " ">
|
---|
[d7c8734] | 8 | <!ENTITY vsftpd-download-ftp "ftp://vsftpd.beasts.org/users/cevans/vsftpd-&vsftpd-version;.tar.gz">
|
---|
[2357981] | 9 | <!ENTITY vsftpd-md5sum "146062e8b2f93af43ff6c2c770feea94">
|
---|
[32ccdf34] | 10 | <!ENTITY vsftpd-size "152 KB">
|
---|
[2357981] | 11 | <!ENTITY vsftpd-buildsize "1.5 MB">
|
---|
[939e5f5] | 12 | <!ENTITY vsftpd-time "less than 0.1 SBU">
|
---|
[d7c8734] | 13 | ]>
|
---|
| 14 |
|
---|
[32ccdf34] | 15 | <sect1 id="vsftpd" xreflabel="vsftpd-&vsftpd-version;">
|
---|
[f8ff412] | 16 | <?dbhtml filename="vsftpd.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
[32ccdf34] | 23 | <title>vsftpd-&vsftpd-version;</title>
|
---|
[f8ff412] | 24 |
|
---|
| 25 | <indexterm zone="vsftpd">
|
---|
[32ccdf34] | 26 | <primary sortas="a-vsftpd">vsftpd</primary>
|
---|
[f8ff412] | 27 | </indexterm>
|
---|
| 28 |
|
---|
[4e82a189] | 29 | <sect2 role="package">
|
---|
[32ccdf34] | 30 | <title>Introduction to vsftpd</title>
|
---|
[f8ff412] | 31 |
|
---|
[32ccdf34] | 32 | <para>The <application>vsftpd</application> package contains a very
|
---|
[f8ff412] | 33 | secure and very small FTP daemon. This is useful for serving files
|
---|
| 34 | over a network.</para>
|
---|
| 35 |
|
---|
| 36 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 37 | <itemizedlist spacing="compact">
|
---|
| 38 | <listitem>
|
---|
| 39 | <para>Download (HTTP): <ulink url="&vsftpd-download-http;"/></para>
|
---|
| 40 | </listitem>
|
---|
| 41 | <listitem>
|
---|
| 42 | <para>Download (FTP): <ulink url="&vsftpd-download-ftp;"/></para>
|
---|
| 43 | </listitem>
|
---|
| 44 | <listitem>
|
---|
| 45 | <para>Download MD5 sum: &vsftpd-md5sum;</para>
|
---|
| 46 | </listitem>
|
---|
| 47 | <listitem>
|
---|
| 48 | <para>Download size: &vsftpd-size;</para>
|
---|
| 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
| 51 | <para>Estimated disk space required: &vsftpd-buildsize;</para>
|
---|
| 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
| 54 | <para>Estimated build time: &vsftpd-time;</para>
|
---|
| 55 | </listitem>
|
---|
| 56 | </itemizedlist>
|
---|
| 57 |
|
---|
[32ccdf34] | 58 | <bridgehead renderas="sect3">vsftpd Dependencies</bridgehead>
|
---|
[f8ff412] | 59 |
|
---|
| 60 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[a6ac43b] | 61 | <para role="optional"><xref linkend="linux-pam"/>,
|
---|
[81d09ea] | 62 | <xref linkend="openssl"/>, <xref linkend="tcpwrappers"/>, and
|
---|
| 63 | <ulink url="http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.4/">
|
---|
| 64 | libcap</ulink></para>
|
---|
[f8ff412] | 65 |
|
---|
[3cb0c57] | 66 | <para condition="html" role="usernotes">User Notes:
|
---|
| 67 | <ulink url="&blfs-wiki;/vsftpd"/></para>
|
---|
| 68 |
|
---|
[f8ff412] | 69 | </sect2>
|
---|
| 70 |
|
---|
| 71 | <sect2 role="installation">
|
---|
[32ccdf34] | 72 | <title>Installation of vsftpd</title>
|
---|
[f8ff412] | 73 |
|
---|
[32ccdf34] | 74 | <para>For security reasons, running <application>vsftpd</application>
|
---|
[939e5f5] | 75 | as an unprivileged user and group is encouraged. Also, a user should be
|
---|
| 76 | created to map anonymous users. As the <systemitem
|
---|
| 77 | class="username">root</systemitem> user, create the needed directories,
|
---|
| 78 | users, and groups with the following commands:</para>
|
---|
[f8ff412] | 79 |
|
---|
| 80 | <screen role="root"><userinput>install -v -d -m 0755 /var/ftp/empty &&
|
---|
| 81 | install -v -d -m 0755 /home/ftp &&
|
---|
[b785ab29] | 82 | groupadd -g 47 vsftpd &&
|
---|
[32ccdf34] | 83 | useradd -d /dev/null -c "vsftpd User" -g vsftpd -s /bin/false \
|
---|
[b785ab29] | 84 | -u 47 vsftpd &&
|
---|
| 85 | groupadd -g 45 ftp &&
|
---|
| 86 | useradd -c anonymous_user -d /home/ftp -g ftp -s /bin/false -u 45 ftp</userinput></screen>
|
---|
[d7c8734] | 87 |
|
---|
[32ccdf34] | 88 | <para>Build <application>vsftpd</application> as an unprivileged user
|
---|
[2bc0646] | 89 | using the following command:</para>
|
---|
[d7c8734] | 90 |
|
---|
[939e5f5] | 91 | <screen><userinput>make</userinput></screen>
|
---|
| 92 |
|
---|
[81d09ea] | 93 | <para>This package does not come with a test suite.</para>
|
---|
| 94 |
|
---|
[939e5f5] | 95 | <para>Once again, become the <systemitem class="username">root</systemitem>
|
---|
[32ccdf34] | 96 | user and install <application>vsftpd</application> with the following
|
---|
[939e5f5] | 97 | commands:</para>
|
---|
| 98 |
|
---|
| 99 | <screen><userinput>install -v -m 755 vsftpd /usr/sbin/vsftpd &&
|
---|
[f8ff412] | 100 | install -v -m 644 vsftpd.8 /usr/share/man/man8 &&
|
---|
| 101 | install -v -m 644 vsftpd.conf.5 /usr/share/man/man5 &&
|
---|
| 102 | install -v -m 644 vsftpd.conf /etc</userinput></screen>
|
---|
[d7c8734] | 103 |
|
---|
[f8ff412] | 104 | </sect2>
|
---|
[d7c8734] | 105 |
|
---|
[f8ff412] | 106 | <sect2 role="commands">
|
---|
| 107 | <title>Command Explanations</title>
|
---|
[d7c8734] | 108 |
|
---|
[2bc0646] | 109 | <para><command>install -v -d ...</command>: This creates the
|
---|
[f8ff412] | 110 | directory that anonymous users will use (<filename
|
---|
| 111 | class='directory'>/home/ftp</filename>)
|
---|
| 112 | and the directory the daemon will chroot into
|
---|
| 113 | (<filename class='directory'>/var/ftp/empty</filename>).</para>
|
---|
[d7c8734] | 114 |
|
---|
[f8ff412] | 115 | <note>
|
---|
| 116 | <para><filename class="directory">/home/ftp</filename> should not be
|
---|
| 117 | owned by the user <systemitem class="username">vsftpd</systemitem>,
|
---|
| 118 | or the user <systemitem class="username">ftp</systemitem>.</para>
|
---|
| 119 | </note>
|
---|
[d7c8734] | 120 |
|
---|
[2bc0646] | 121 | <para><command>echo "#define VSF_BUILD_TCPWRAPPERS" >>builddefs.h</command>:
|
---|
[f8ff412] | 122 | Use this prior to <command>make</command> to add support for
|
---|
| 123 | <application>tcpwrappers</application>.</para>
|
---|
[d7c8734] | 124 |
|
---|
[2bc0646] | 125 | <para><command>echo "#define VSF_BUILD_SSL" >>builddefs.h</command>:
|
---|
[f8ff412] | 126 | Use this prior to <command>make</command> to add support for SSL.</para>
|
---|
[d7c8734] | 127 |
|
---|
[2bc0646] | 128 | <para><command>install -v -m ...</command>:
|
---|
| 129 | The <filename>Makefile</filename> uses non-standard installation paths.
|
---|
| 130 | These commands install the files in
|
---|
| 131 | <filename class='directory'>/usr</filename> and
|
---|
| 132 | <filename class='directory'>/etc</filename>.</para>
|
---|
[d7c8734] | 133 |
|
---|
[f8ff412] | 134 | </sect2>
|
---|
[d7c8734] | 135 |
|
---|
[f8ff412] | 136 | <sect2 role="configuration">
|
---|
[32ccdf34] | 137 | <title>Configuring vsftpd</title>
|
---|
[d7c8734] | 138 |
|
---|
[f8ff412] | 139 | <sect3 id="vsftpd-config">
|
---|
| 140 | <title>Config Files</title>
|
---|
[1586494] | 141 |
|
---|
[f8ff412] | 142 | <para><filename>/etc/vsftpd.conf</filename></para>
|
---|
[d7c8734] | 143 |
|
---|
[f8ff412] | 144 | <indexterm zone="vsftpd vsftpd-config">
|
---|
| 145 | <primary sortas="e-etc-vsftpd.conf">/etc/vsftpd.conf</primary>
|
---|
| 146 | </indexterm>
|
---|
[d7c8734] | 147 |
|
---|
[f8ff412] | 148 | </sect3>
|
---|
[d7c8734] | 149 |
|
---|
[f8ff412] | 150 | <sect3>
|
---|
| 151 | <title>Configuration Information</title>
|
---|
[d7c8734] | 152 |
|
---|
[32ccdf34] | 153 | <para><application>vsftpd</application> comes with a basic
|
---|
[f8ff412] | 154 | anonymous-only configuration file that was copied to
|
---|
[939e5f5] | 155 | <filename class='directory'>/etc</filename> above. While still as
|
---|
| 156 | <systemitem class="username">root</systemitem>, this file should be
|
---|
[f8ff412] | 157 | modified because it is now recommended to run <command>vsftpd</command>
|
---|
| 158 | in standalone mode as opposed to
|
---|
| 159 | <command>inetd</command>/<command>xinetd</command> mode. Also, you
|
---|
| 160 | should specify the privilege separation user created above. Finally,
|
---|
| 161 | you should specify the <command>chroot</command> directory.
|
---|
| 162 | <command>man vsftpd.conf</command> will give you all the details.</para>
|
---|
| 163 |
|
---|
| 164 | <screen role="root"><userinput>cat >> /etc/vsftpd.conf << "EOF"
|
---|
| 165 | <literal>background=YES
|
---|
[d7c8734] | 166 | listen=YES
|
---|
| 167 | nopriv_user=vsftpd
|
---|
[f8ff412] | 168 | secure_chroot_dir=/var/ftp/empty</literal>
|
---|
| 169 | EOF</userinput></screen>
|
---|
[d7c8734] | 170 |
|
---|
[f8ff412] | 171 | </sect3>
|
---|
[d7c8734] | 172 |
|
---|
[f8ff412] | 173 | <sect3 id="vsftpd-init">
|
---|
| 174 | <title>Boot Script</title>
|
---|
[d7c8734] | 175 |
|
---|
[f8ff412] | 176 | <para>Install the <filename>/etc/rc.d/init.d/vsftpd</filename>
|
---|
| 177 | init script included in the
|
---|
[5254d12] | 178 | <xref linkend="bootscripts"/> package.</para>
|
---|
[d7c8734] | 179 |
|
---|
[f8ff412] | 180 | <screen role="root"><userinput>make install-vsftpd</userinput></screen>
|
---|
[d7c8734] | 181 |
|
---|
[f8ff412] | 182 | </sect3>
|
---|
[d7c8734] | 183 |
|
---|
[f8ff412] | 184 | </sect2>
|
---|
[d7c8734] | 185 |
|
---|
[f8ff412] | 186 | <sect2 role="content">
|
---|
| 187 | <title>Contents</title>
|
---|
[d7c8734] | 188 |
|
---|
[f8ff412] | 189 | <segmentedlist>
|
---|
| 190 | <segtitle>Installed Program</segtitle>
|
---|
| 191 | <segtitle>Installed Libraries</segtitle>
|
---|
| 192 | <segtitle>Installed Directories</segtitle>
|
---|
| 193 |
|
---|
| 194 | <seglistitem>
|
---|
| 195 | <seg>vsftpd</seg>
|
---|
| 196 | <seg>None</seg>
|
---|
[939e5f5] | 197 | <seg>/var/ftp, /var/ftp/empty, /home/ftp</seg>
|
---|
[f8ff412] | 198 | </seglistitem>
|
---|
| 199 | </segmentedlist>
|
---|
| 200 |
|
---|
| 201 | <variablelist>
|
---|
| 202 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 203 | <?dbfo list-presentation="list"?>
|
---|
| 204 | <?dbhtml list-presentation="table"?>
|
---|
[d7c8734] | 205 |
|
---|
[f8ff412] | 206 | <varlistentry id="vsftpd-prog">
|
---|
| 207 | <term><command>vsftpd</command></term>
|
---|
| 208 | <listitem>
|
---|
| 209 | <para>is the FTP daemon.</para>
|
---|
| 210 | <indexterm zone="vsftpd vsftpd-prog">
|
---|
| 211 | <primary sortas="b-vsftpd">vsftpd</primary>
|
---|
| 212 | </indexterm>
|
---|
| 213 | </listitem>
|
---|
| 214 | </varlistentry>
|
---|
| 215 |
|
---|
| 216 | </variablelist>
|
---|
| 217 |
|
---|
| 218 | </sect2>
|
---|
| 219 |
|
---|
| 220 | </sect1>
|
---|