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