[d7c8734] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY vsftpd-download-http "">
|
---|
| 8 | <!ENTITY vsftpd-download-ftp "ftp://vsftpd.beasts.org/users/cevans/vsftpd-&vsftpd-version;.tar.gz">
|
---|
| 9 | <!ENTITY vsftpd-size "148 KB">
|
---|
| 10 | <!ENTITY vsftpd-buildsize "492 KB">
|
---|
| 11 | <!ENTITY vsftpd-time "0.0 SBU">
|
---|
| 12 | ]>
|
---|
| 13 |
|
---|
| 14 | <sect1 id="vsftpd" xreflabel="vsFTPD-&vsftpd-version;">
|
---|
| 15 | <?dbhtml filename="vsftpd.html"?>
|
---|
| 16 | <title>vsFTPD-&vsftpd-version;</title>
|
---|
| 17 |
|
---|
| 18 | <sect2>
|
---|
| 19 | <title>Introduction to vsFTPD</title>
|
---|
| 20 |
|
---|
| 21 | <para>The <application>vsFTPD</application> package contains a very secure and
|
---|
| 22 | very small FTP daemon. This is useful for serving files over a network.</para>
|
---|
| 23 |
|
---|
| 24 | <sect3><title>Package information</title>
|
---|
| 25 | <itemizedlist spacing='compact'>
|
---|
| 26 | <listitem><para>Download (HTTP):<ulink url="&vsftpd-download-http;"/></para></listitem>
|
---|
| 27 | <listitem><para>Download (FTP): <ulink url="&vsftpd-download-ftp;"/></para></listitem>
|
---|
| 28 | <listitem><para>Download size: &vsftpd-size;</para></listitem>
|
---|
| 29 | <listitem><para>Estimated Disk space required: &vsftpd-buildsize;</para></listitem>
|
---|
| 30 | <listitem><para>Estimated build time: &vsftpd-time;</para></listitem></itemizedlist>
|
---|
| 31 | </sect3>
|
---|
| 32 |
|
---|
| 33 | <sect3><title><application>vsFTPD</application> dependencies</title>
|
---|
| 34 | <sect4><title>Optional</title>
|
---|
| 35 | <para><xref linkend="Linux_PAM"/>,
|
---|
| 36 | <xref linkend="openssl"/>, and
|
---|
| 37 | <xref linkend="tcpwrappers"/></para></sect4>
|
---|
| 38 | </sect3>
|
---|
| 39 |
|
---|
| 40 | </sect2>
|
---|
| 41 |
|
---|
| 42 | <sect2>
|
---|
| 43 | <title>Installation of <application>vsFTPD</application></title>
|
---|
| 44 |
|
---|
| 45 | <para>For security reasons, running <application>vsFTPD</application> as an
|
---|
| 46 | unprivileged user and group is encouraged. Also, we need a user to map
|
---|
| 47 | anonymous users to.</para>
|
---|
| 48 |
|
---|
[3f037be] | 49 | <screen><userinput><command>install -d -m 0755 /var/ftp/empty &&
|
---|
| 50 | install -d -m 0755 /home/ftp &&
|
---|
[d7c8734] | 51 | groupadd vsftpd &&
|
---|
| 52 | useradd -d /dev/null -g vsftpd -s /bin/false vsftpd &&
|
---|
| 53 | groupadd ftp &&
|
---|
| 54 | useradd -c anonymous_user -d /home/ftp -g ftp -s /bin/false ftp</command>
|
---|
| 55 | </userinput></screen>
|
---|
| 56 |
|
---|
| 57 | <para>Install <application>vsFTPD</application> by running the following commands:</para>
|
---|
| 58 |
|
---|
| 59 | <screen><userinput><command>make &&
|
---|
| 60 | install -m 755 vsftpd /usr/sbin/vsftpd &&
|
---|
[e4fef732] | 61 | install -m 644 vsftpd.8 /usr/share/man/man8 &&
|
---|
| 62 | install -m 644 vsftpd.conf.5 /usr/share/man/man5 &&
|
---|
[d7c8734] | 63 | install -m 644 vsftpd.conf /etc
|
---|
| 64 | </command></userinput></screen>
|
---|
| 65 |
|
---|
| 66 | </sect2>
|
---|
| 67 |
|
---|
| 68 | <sect2>
|
---|
| 69 | <title>Command explanations</title>
|
---|
| 70 |
|
---|
[3f037be] | 71 | <para><parameter>install -d [...]</parameter>: This creates the directory that
|
---|
| 72 | anonymous users will use (/home/ftp) and the directory the daemon will chroot
|
---|
| 73 | into (/var/ftp/empty).</para>
|
---|
[d7c8734] | 74 |
|
---|
| 75 | <note><para><filename class="directory">/home/ftp</filename> should not be
|
---|
| 76 | owned by the user vsftpd, or the user ftp.</para></note>
|
---|
| 77 |
|
---|
| 78 | <para><parameter>echo "#define VSF_BUILD_TCPWRAPPERS" >>builddefs.h</parameter>:
|
---|
| 79 | Use this prior to make to add support for tcpwrappers.</para>
|
---|
| 80 |
|
---|
| 81 | <para><parameter>echo "#define VSF_BUILD_SSL" >>builddefs.h</parameter>:
|
---|
| 82 | Use this prior to make to add support for SSL.</para>
|
---|
| 83 |
|
---|
| 84 | <para><parameter>install -m [...]</parameter>:
|
---|
| 85 | The Makefile hardwires /usr/local (if it exists). We want the files in /usr.</para>
|
---|
| 86 |
|
---|
| 87 | </sect2>
|
---|
| 88 |
|
---|
| 89 | <sect2>
|
---|
| 90 | <title>Configuring <application>vsFTPD</application></title>
|
---|
| 91 |
|
---|
| 92 | <sect3><title>vsftpd init.d script</title>
|
---|
| 93 | <para>Install the <filename>/etc/rc.d/init.d/vsftpd</filename>
|
---|
| 94 | init script included in the <xref linkend="intro-important-bootscripts"/> package.</para>
|
---|
| 95 |
|
---|
| 96 | <screen><userinput><command>make install-vsftpd</command></userinput></screen>
|
---|
| 97 |
|
---|
| 98 | </sect3>
|
---|
| 99 |
|
---|
| 100 | <sect3><title>Config files</title>
|
---|
| 101 |
|
---|
| 102 | <para><filename>/etc/vsftpd.conf</filename></para> <para>vsFTPD comes with a
|
---|
| 103 | basic anonymous-only configuration file that was copied to /etc above. We will
|
---|
| 104 | modify this file because it is now recommended to run vsFTPD in standalone mode
|
---|
| 105 | as opposed to inetd/xinetd mode. Also, we need to specify the priviledge
|
---|
| 106 | separation user we created above. Finally, we need to specify the chroot
|
---|
| 107 | directory. <command>man vsftpd.conf</command> will give you all the
|
---|
| 108 | details.</para>
|
---|
| 109 |
|
---|
| 110 | <screen><userinput><command>cat >> /etc/vsftpd.conf << "EOF"</command>
|
---|
[e4fef732] | 111 | background=YES
|
---|
[d7c8734] | 112 | listen=YES
|
---|
| 113 | nopriv_user=vsftpd
|
---|
| 114 | secure_chroot_dir=/var/ftp/empty
|
---|
| 115 | <command>EOF</command></userinput></screen></sect3>
|
---|
| 116 |
|
---|
| 117 | </sect2>
|
---|
| 118 |
|
---|
| 119 | <sect2>
|
---|
| 120 | <title>Contents</title>
|
---|
| 121 |
|
---|
| 122 | <para>The <application>vsFTPD</application> package contains
|
---|
| 123 | <command>vsftpd</command>.</para>
|
---|
| 124 |
|
---|
| 125 | </sect2>
|
---|
| 126 |
|
---|
| 127 | <sect2><title>Description</title>
|
---|
| 128 |
|
---|
| 129 | <sect3><title>vsftpd</title>
|
---|
| 130 | <para><command>vsftpd</command> is the daemon itself.</para></sect3>
|
---|
| 131 |
|
---|
| 132 | </sect2>
|
---|
| 133 |
|
---|
| 134 | </sect1>
|
---|
| 135 |
|
---|