[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>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
| 23 | <title>vsFTPD-&vsftpd-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="vsftpd">
|
---|
| 26 | <primary sortas="a-vsFTPD">vsFTPD</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
[4e82a189] | 29 | <sect2 role="package">
|
---|
[f8ff412] | 30 | <title>Introduction to vsFTPD</title>
|
---|
| 31 |
|
---|
| 32 | <para>The <application>vsFTPD</application> package contains a very
|
---|
| 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 |
|
---|
| 58 | <bridgehead renderas="sect3">vsFTPD Dependencies</bridgehead>
|
---|
| 59 |
|
---|
| 60 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 61 | <para><xref linkend="Linux_PAM"/>,
|
---|
| 62 | <xref linkend="openssl"/>, and
|
---|
| 63 | <xref linkend="tcpwrappers"/></para>
|
---|
| 64 |
|
---|
| 65 | </sect2>
|
---|
| 66 |
|
---|
| 67 | <sect2 role="installation">
|
---|
| 68 | <title>Installation of vsFTPD</title>
|
---|
| 69 |
|
---|
| 70 | <para>For security reasons, running <application>vsFTPD</application>
|
---|
[939e5f5] | 71 | as an unprivileged user and group is encouraged. Also, a user should be
|
---|
| 72 | created to map anonymous users. As the <systemitem
|
---|
| 73 | class="username">root</systemitem> user, create the needed directories,
|
---|
| 74 | users, and groups with the following commands:</para>
|
---|
[f8ff412] | 75 |
|
---|
| 76 | <screen role="root"><userinput>install -v -d -m 0755 /var/ftp/empty &&
|
---|
| 77 | install -v -d -m 0755 /home/ftp &&
|
---|
[b785ab29] | 78 | groupadd -g 47 vsftpd &&
|
---|
| 79 | useradd -d /dev/null -c "vsFTPD User" -g vsftpd -s /bin/false \
|
---|
| 80 | -u 47 vsftpd &&
|
---|
| 81 | groupadd -g 45 ftp &&
|
---|
| 82 | useradd -c anonymous_user -d /home/ftp -g ftp -s /bin/false -u 45 ftp</userinput></screen>
|
---|
[d7c8734] | 83 |
|
---|
[939e5f5] | 84 | <para>Build <application>vsFTPD</application> as an unprivileged user
|
---|
| 85 | with the following commands:</para>
|
---|
[d7c8734] | 86 |
|
---|
[939e5f5] | 87 | <screen><userinput>make</userinput></screen>
|
---|
| 88 |
|
---|
| 89 | <para>Once again, become the <systemitem class="username">root</systemitem>
|
---|
| 90 | user and install <application>vsFTPD</application> with the following
|
---|
| 91 | commands:</para>
|
---|
| 92 |
|
---|
| 93 | <screen><userinput>install -v -m 755 vsftpd /usr/sbin/vsftpd &&
|
---|
[f8ff412] | 94 | install -v -m 644 vsftpd.8 /usr/share/man/man8 &&
|
---|
| 95 | install -v -m 644 vsftpd.conf.5 /usr/share/man/man5 &&
|
---|
| 96 | install -v -m 644 vsftpd.conf /etc</userinput></screen>
|
---|
[d7c8734] | 97 |
|
---|
[f8ff412] | 98 | </sect2>
|
---|
[d7c8734] | 99 |
|
---|
[f8ff412] | 100 | <sect2 role="commands">
|
---|
| 101 | <title>Command Explanations</title>
|
---|
[d7c8734] | 102 |
|
---|
[f8ff412] | 103 | <para><parameter>install -v -d [...]</parameter>: This creates the
|
---|
| 104 | directory that anonymous users will use (<filename
|
---|
| 105 | class='directory'>/home/ftp</filename>)
|
---|
| 106 | and the directory the daemon will chroot into
|
---|
| 107 | (<filename class='directory'>/var/ftp/empty</filename>).</para>
|
---|
[d7c8734] | 108 |
|
---|
[f8ff412] | 109 | <note>
|
---|
| 110 | <para><filename class="directory">/home/ftp</filename> should not be
|
---|
| 111 | owned by the user <systemitem class="username">vsftpd</systemitem>,
|
---|
| 112 | or the user <systemitem class="username">ftp</systemitem>.</para>
|
---|
| 113 | </note>
|
---|
[d7c8734] | 114 |
|
---|
[f8ff412] | 115 | <para><option>echo "#define VSF_BUILD_TCPWRAPPERS" >>builddefs.h</option>:
|
---|
| 116 | Use this prior to <command>make</command> to add support for
|
---|
| 117 | <application>tcpwrappers</application>.</para>
|
---|
[d7c8734] | 118 |
|
---|
[f8ff412] | 119 | <para><option>echo "#define VSF_BUILD_SSL" >>builddefs.h</option>:
|
---|
| 120 | Use this prior to <command>make</command> to add support for SSL.</para>
|
---|
[d7c8734] | 121 |
|
---|
[f8ff412] | 122 | <para><option>install -m [...]</option>:
|
---|
| 123 | The <filename>Makefile</filename> hardwires
|
---|
| 124 | <filename class='directory'>/usr/local</filename> (if it exists). These
|
---|
| 125 | commands install the files in
|
---|
| 126 | <filename class='directory'>/usr</filename>.</para>
|
---|
[d7c8734] | 127 |
|
---|
[f8ff412] | 128 | </sect2>
|
---|
[d7c8734] | 129 |
|
---|
[f8ff412] | 130 | <sect2 role="configuration">
|
---|
| 131 | <title>Configuring vsFTPD</title>
|
---|
[d7c8734] | 132 |
|
---|
[f8ff412] | 133 | <sect3 id="vsftpd-config">
|
---|
| 134 | <title>Config Files</title>
|
---|
[1586494] | 135 |
|
---|
[f8ff412] | 136 | <para><filename>/etc/vsftpd.conf</filename></para>
|
---|
[d7c8734] | 137 |
|
---|
[f8ff412] | 138 | <indexterm zone="vsftpd vsftpd-config">
|
---|
| 139 | <primary sortas="e-etc-vsftpd.conf">/etc/vsftpd.conf</primary>
|
---|
| 140 | </indexterm>
|
---|
[d7c8734] | 141 |
|
---|
[f8ff412] | 142 | </sect3>
|
---|
[d7c8734] | 143 |
|
---|
[f8ff412] | 144 | <sect3>
|
---|
| 145 | <title>Configuration Information</title>
|
---|
[d7c8734] | 146 |
|
---|
[f8ff412] | 147 | <para><application>vsFTPD</application> comes with a basic
|
---|
| 148 | anonymous-only configuration file that was copied to
|
---|
[939e5f5] | 149 | <filename class='directory'>/etc</filename> above. While still as
|
---|
| 150 | <systemitem class="username">root</systemitem>, this file should be
|
---|
[f8ff412] | 151 | modified because it is now recommended to run <command>vsftpd</command>
|
---|
| 152 | in standalone mode as opposed to
|
---|
| 153 | <command>inetd</command>/<command>xinetd</command> mode. Also, you
|
---|
| 154 | should specify the privilege separation user created above. Finally,
|
---|
| 155 | you should specify the <command>chroot</command> directory.
|
---|
| 156 | <command>man vsftpd.conf</command> will give you all the details.</para>
|
---|
| 157 |
|
---|
| 158 | <screen role="root"><userinput>cat >> /etc/vsftpd.conf << "EOF"
|
---|
| 159 | <literal>background=YES
|
---|
[d7c8734] | 160 | listen=YES
|
---|
| 161 | nopriv_user=vsftpd
|
---|
[f8ff412] | 162 | secure_chroot_dir=/var/ftp/empty</literal>
|
---|
| 163 | EOF</userinput></screen>
|
---|
[d7c8734] | 164 |
|
---|
[f8ff412] | 165 | </sect3>
|
---|
[d7c8734] | 166 |
|
---|
[f8ff412] | 167 | <sect3 id="vsftpd-init">
|
---|
| 168 | <title>Boot Script</title>
|
---|
[d7c8734] | 169 |
|
---|
[f8ff412] | 170 | <para>Install the <filename>/etc/rc.d/init.d/vsftpd</filename>
|
---|
| 171 | init script included in the
|
---|
| 172 | <xref linkend="intro-important-bootscripts"/> package.</para>
|
---|
[d7c8734] | 173 |
|
---|
[f8ff412] | 174 | <screen role="root"><userinput>make install-vsftpd</userinput></screen>
|
---|
[d7c8734] | 175 |
|
---|
[f8ff412] | 176 | </sect3>
|
---|
[d7c8734] | 177 |
|
---|
[f8ff412] | 178 | </sect2>
|
---|
[d7c8734] | 179 |
|
---|
[f8ff412] | 180 | <sect2 role="content">
|
---|
| 181 | <title>Contents</title>
|
---|
[d7c8734] | 182 |
|
---|
[f8ff412] | 183 | <segmentedlist>
|
---|
| 184 | <segtitle>Installed Program</segtitle>
|
---|
| 185 | <segtitle>Installed Libraries</segtitle>
|
---|
| 186 | <segtitle>Installed Directories</segtitle>
|
---|
| 187 |
|
---|
| 188 | <seglistitem>
|
---|
| 189 | <seg>vsftpd</seg>
|
---|
| 190 | <seg>None</seg>
|
---|
[939e5f5] | 191 | <seg>/var/ftp, /var/ftp/empty, /home/ftp</seg>
|
---|
[f8ff412] | 192 | </seglistitem>
|
---|
| 193 | </segmentedlist>
|
---|
| 194 |
|
---|
| 195 | <variablelist>
|
---|
| 196 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 197 | <?dbfo list-presentation="list"?>
|
---|
| 198 | <?dbhtml list-presentation="table"?>
|
---|
[d7c8734] | 199 |
|
---|
[f8ff412] | 200 | <varlistentry id="vsftpd-prog">
|
---|
| 201 | <term><command>vsftpd</command></term>
|
---|
| 202 | <listitem>
|
---|
| 203 | <para>is the FTP daemon.</para>
|
---|
| 204 | <indexterm zone="vsftpd vsftpd-prog">
|
---|
| 205 | <primary sortas="b-vsftpd">vsftpd</primary>
|
---|
| 206 | </indexterm>
|
---|
| 207 | </listitem>
|
---|
| 208 | </varlistentry>
|
---|
| 209 |
|
---|
| 210 | </variablelist>
|
---|
| 211 |
|
---|
| 212 | </sect2>
|
---|
| 213 |
|
---|
| 214 | </sect1>
|
---|