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