1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/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-md5sum "146062e8b2f93af43ff6c2c770feea94">
|
---|
10 | <!ENTITY vsftpd-size "152 KB">
|
---|
11 | <!ENTITY vsftpd-buildsize "1.5 MB">
|
---|
12 | <!ENTITY vsftpd-time "less than 0.1 SBU">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="vsftpd" xreflabel="vsftpd-&vsftpd-version;">
|
---|
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 |
|
---|
29 | <sect2 role="package">
|
---|
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 role="optional"><xref linkend="linux-pam"/>,
|
---|
62 | <xref linkend="openssl"/>, <xref linkend="tcpwrappers"/>, and
|
---|
63 | <ulink url="http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.4/">
|
---|
64 | libcap</ulink></para>
|
---|
65 |
|
---|
66 | <para condition="html" role="usernotes">User Notes:
|
---|
67 | <ulink url="&blfs-wiki;/vsftpd"/></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>
|
---|
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>
|
---|
79 |
|
---|
80 | <screen role="root"><userinput>install -v -d -m 0755 /var/ftp/empty &&
|
---|
81 | install -v -d -m 0755 /home/ftp &&
|
---|
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>
|
---|
87 |
|
---|
88 | <para>Build <application>vsftpd</application> as an unprivileged user
|
---|
89 | using the following command:</para>
|
---|
90 |
|
---|
91 | <screen><userinput>make</userinput></screen>
|
---|
92 |
|
---|
93 | <para>This package does not come with a test suite.</para>
|
---|
94 |
|
---|
95 | <para>Once again, become the <systemitem class="username">root</systemitem>
|
---|
96 | user and install <application>vsftpd</application> with the following
|
---|
97 | commands:</para>
|
---|
98 |
|
---|
99 | <screen><userinput>install -v -m 755 vsftpd /usr/sbin/vsftpd &&
|
---|
100 | install -v -m 644 vsftpd.8 /usr/share/man/man8 &&
|
---|
101 | install -v -m 644 vsftpd.conf.5 /usr/share/man/man5 &&
|
---|
102 | install -v -m 644 vsftpd.conf /etc</userinput></screen>
|
---|
103 |
|
---|
104 | </sect2>
|
---|
105 |
|
---|
106 | <sect2 role="commands">
|
---|
107 | <title>Command Explanations</title>
|
---|
108 |
|
---|
109 | <para><command>install -v -d ...</command>: This creates the
|
---|
110 | directory that anonymous users will use (<filename
|
---|
111 | class='directory'>/home/ftp</filename>)
|
---|
112 | and the directory the daemon will chroot into
|
---|
113 | (<filename class='directory'>/var/ftp/empty</filename>).</para>
|
---|
114 |
|
---|
115 | <note>
|
---|
116 | <para><filename class="directory">/home/ftp</filename> should not be
|
---|
117 | owned by the user <systemitem class="username">vsftpd</systemitem>,
|
---|
118 | or the user <systemitem class="username">ftp</systemitem>.</para>
|
---|
119 | </note>
|
---|
120 |
|
---|
121 | <para><command>echo "#define VSF_BUILD_TCPWRAPPERS" >>builddefs.h</command>:
|
---|
122 | Use this prior to <command>make</command> to add support for
|
---|
123 | <application>tcpwrappers</application>.</para>
|
---|
124 |
|
---|
125 | <para><command>echo "#define VSF_BUILD_SSL" >>builddefs.h</command>:
|
---|
126 | Use this prior to <command>make</command> to add support for SSL.</para>
|
---|
127 |
|
---|
128 | <para><command>install -v -m ...</command>:
|
---|
129 | The <filename>Makefile</filename> uses non-standard installation paths.
|
---|
130 | These commands install the files in
|
---|
131 | <filename class='directory'>/usr</filename> and
|
---|
132 | <filename class='directory'>/etc</filename>.</para>
|
---|
133 |
|
---|
134 | </sect2>
|
---|
135 |
|
---|
136 | <sect2 role="configuration">
|
---|
137 | <title>Configuring vsftpd</title>
|
---|
138 |
|
---|
139 | <sect3 id="vsftpd-config">
|
---|
140 | <title>Config Files</title>
|
---|
141 |
|
---|
142 | <para><filename>/etc/vsftpd.conf</filename></para>
|
---|
143 |
|
---|
144 | <indexterm zone="vsftpd vsftpd-config">
|
---|
145 | <primary sortas="e-etc-vsftpd.conf">/etc/vsftpd.conf</primary>
|
---|
146 | </indexterm>
|
---|
147 |
|
---|
148 | </sect3>
|
---|
149 |
|
---|
150 | <sect3>
|
---|
151 | <title>Configuration Information</title>
|
---|
152 |
|
---|
153 | <para><application>vsftpd</application> comes with a basic
|
---|
154 | anonymous-only configuration file that was copied to
|
---|
155 | <filename class='directory'>/etc</filename> above. While still as
|
---|
156 | <systemitem class="username">root</systemitem>, this file should be
|
---|
157 | modified because it is now recommended to run <command>vsftpd</command>
|
---|
158 | in standalone mode as opposed to
|
---|
159 | <command>inetd</command>/<command>xinetd</command> mode. Also, you
|
---|
160 | should specify the privilege separation user created above. Finally,
|
---|
161 | you should specify the <command>chroot</command> directory.
|
---|
162 | <command>man vsftpd.conf</command> will give you all the details.</para>
|
---|
163 |
|
---|
164 | <screen role="root"><userinput>cat >> /etc/vsftpd.conf << "EOF"
|
---|
165 | <literal>background=YES
|
---|
166 | listen=YES
|
---|
167 | nopriv_user=vsftpd
|
---|
168 | secure_chroot_dir=/var/ftp/empty</literal>
|
---|
169 | EOF</userinput></screen>
|
---|
170 |
|
---|
171 | </sect3>
|
---|
172 |
|
---|
173 | <sect3 id="vsftpd-init">
|
---|
174 | <title>Boot Script</title>
|
---|
175 |
|
---|
176 | <para>Install the <filename>/etc/rc.d/init.d/vsftpd</filename>
|
---|
177 | init script included in the
|
---|
178 | <xref linkend="bootscripts"/> package.</para>
|
---|
179 |
|
---|
180 | <screen role="root"><userinput>make install-vsftpd</userinput></screen>
|
---|
181 |
|
---|
182 | </sect3>
|
---|
183 |
|
---|
184 | </sect2>
|
---|
185 |
|
---|
186 | <sect2 role="content">
|
---|
187 | <title>Contents</title>
|
---|
188 |
|
---|
189 | <segmentedlist>
|
---|
190 | <segtitle>Installed Program</segtitle>
|
---|
191 | <segtitle>Installed Libraries</segtitle>
|
---|
192 | <segtitle>Installed Directories</segtitle>
|
---|
193 |
|
---|
194 | <seglistitem>
|
---|
195 | <seg>vsftpd</seg>
|
---|
196 | <seg>None</seg>
|
---|
197 | <seg>/var/ftp, /var/ftp/empty, /home/ftp</seg>
|
---|
198 | </seglistitem>
|
---|
199 | </segmentedlist>
|
---|
200 |
|
---|
201 | <variablelist>
|
---|
202 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
203 | <?dbfo list-presentation="list"?>
|
---|
204 | <?dbhtml list-presentation="table"?>
|
---|
205 |
|
---|
206 | <varlistentry id="vsftpd-prog">
|
---|
207 | <term><command>vsftpd</command></term>
|
---|
208 | <listitem>
|
---|
209 | <para>is the FTP daemon.</para>
|
---|
210 | <indexterm zone="vsftpd vsftpd-prog">
|
---|
211 | <primary sortas="b-vsftpd">vsftpd</primary>
|
---|
212 | </indexterm>
|
---|
213 | </listitem>
|
---|
214 | </varlistentry>
|
---|
215 |
|
---|
216 | </variablelist>
|
---|
217 |
|
---|
218 | </sect2>
|
---|
219 |
|
---|
220 | </sect1>
|
---|