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