source: server/major/vsftpd.xml@ 45ab6c7

trunk
Last change on this file since 45ab6c7 was 45ab6c7, checked in by Xi Ruoyao <xry111@…>, 3 months ago

more SVN prop clean up

Remove "$LastChanged$" everywhere, and also some unused $Date$

  • Property mode set to 100644
File size: 10.5 KB
Line 
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 "https://security.appspot.com/downloads/vsftpd-&vsftpd-version;.tar.gz">
8 <!ENTITY vsftpd-download-ftp " ">
9 <!ENTITY vsftpd-md5sum "da119d084bd3f98664636ea05b5bb398">
10 <!ENTITY vsftpd-size "196 KB">
11 <!ENTITY vsftpd-buildsize "2 MB">
12 <!ENTITY vsftpd-time "less than 0.1 SBU">
13 <!ENTITY vsftpd-empty "/usr/share/vsftpd/empty">
14]>
15
16<sect1 id="vsftpd" xreflabel="vsftpd-&vsftpd-version;">
17 <?dbhtml filename="vsftpd.html"?>
18
19 <sect1info>
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>
33 The <application>vsftpd</application> package contains a very
34 secure and very small FTP daemon. This is useful for serving files
35 over a network.
36 </para>
37
38 &lfs101_checked;
39
40 <bridgehead renderas="sect3">Package Information</bridgehead>
41 <itemizedlist spacing="compact">
42 <listitem>
43 <para>
44 Download (HTTP): <ulink url="&vsftpd-download-http;"/>
45 </para>
46 </listitem>
47 <listitem>
48 <para>
49 Download (FTP): <ulink url="&vsftpd-download-ftp;"/>
50 </para>
51 </listitem>
52 <listitem>
53 <para>
54 Download MD5 sum: &vsftpd-md5sum;
55 </para>
56 </listitem>
57 <listitem>
58 <para>
59 Download size: &vsftpd-size;
60 </para>
61 </listitem>
62 <listitem>
63 <para>
64 Estimated disk space required: &vsftpd-buildsize;
65 </para>
66 </listitem>
67 <listitem>
68 <para>
69 Estimated build time: &vsftpd-time;
70 </para>
71 </listitem>
72 </itemizedlist>
73
74 <bridgehead renderas="sect3">vsftpd Dependencies</bridgehead>
75
76 <bridgehead renderas="sect4">Required</bridgehead>
77 <para role="required">
78 <xref linkend="libnsl"/>
79 </para>
80
81 <bridgehead renderas="sect4">Recommended</bridgehead>
82 <para role="recommended">
83 <xref linkend="linux-pam"/>
84 </para>
85
86 <bridgehead renderas="sect4">Optional</bridgehead>
87 <para role="optional">
88 <xref linkend="libcap-pam"/>
89 </para>
90
91 <para condition="html" role="usernotes">User Notes:
92 <ulink url="&blfs-wiki;/vsftpd"/></para>
93
94 </sect2>
95
96 <sect2 role="installation">
97 <title>Installation of vsftpd</title>
98
99 <para>
100 For security reasons, running <application>vsftpd</application>
101 as an unprivileged user and group is encouraged. Also, a user should be
102 created to map anonymous users. As the <systemitem
103 class="username">root</systemitem> user, create the needed directories,
104 users, and groups with the following commands:
105 </para>
106
107<screen role="root"><userinput>install -v -d -m 0755 &vsftpd-empty; &amp;&amp;
108install -v -d -m 0755 /home/ftp &amp;&amp;
109groupadd -g 47 vsftpd &amp;&amp;
110groupadd -g 45 ftp &amp;&amp;
111
112useradd -c "vsftpd User" -d /dev/null -g vsftpd -s /bin/false -u 47 vsftpd &amp;&amp;
113useradd -c anonymous_user -d /home/ftp -g ftp -s /bin/false -u 45 ftp</userinput></screen>
114
115 <para>
116 Gcc-10 and later flags an error for an implicit type cast. Make it
117 explicit:
118 </para>
119
120<screen><userinput>sed -e "s/kVSFSysStrOpenUnknown;/(enum EVSFSysUtilOpenMode)&amp;/" -i sysstr.c</userinput></screen>
121
122 <para>
123 Build <application>vsftpd</application> as an unprivileged user
124 using the following command:
125 </para>
126
127<screen><userinput>make</userinput></screen>
128
129 <para>
130 This package does not come with a test suite.
131 </para>
132
133 <para>
134 Once again, become the <systemitem class="username">root</systemitem>
135 user and install <application>vsftpd</application> with the following
136 commands:
137 </para>
138
139<screen role="root"><userinput>install -v -m 755 vsftpd /usr/sbin/vsftpd &amp;&amp;
140install -v -m 644 vsftpd.8 /usr/share/man/man8 &amp;&amp;
141install -v -m 644 vsftpd.conf.5 /usr/share/man/man5 &amp;&amp;
142install -v -m 644 vsftpd.conf /etc</userinput></screen>
143
144 </sect2>
145
146 <sect2 role="commands">
147 <title>Command Explanations</title>
148
149 <para>
150 <command>install -v -d ...</command>: This creates the
151 directory that anonymous users will use (<filename
152 class='directory'>/home/ftp</filename>)
153 and the directory the daemon will chroot into
154 (<filename class='directory'>&vsftpd-empty;</filename>).
155 </para>
156
157 <note>
158 <para>
159 <filename class="directory">/home/ftp</filename> should not be
160 owned by the user <systemitem class="username">vsftpd</systemitem>,
161 or the user <systemitem class="username">ftp</systemitem>.
162 </para>
163 </note>
164
165 <para>
166 <command>echo "#define VSF_BUILD_TCPWRAPPERS" >>builddefs.h</command>:
167 Use this prior to <command>make</command> to add support for
168 <application>tcpwrappers</application>.
169 </para>
170
171 <para>
172 <command>echo "#define VSF_BUILD_SSL" >>builddefs.h</command>:
173 Use this prior to <command>make</command> to add support for SSL.
174 </para>
175
176 <para>
177 <command>install -v -m ...</command>:
178 The <filename>Makefile</filename> uses non-standard installation paths.
179 These commands install the files in
180 <filename class='directory'>/usr</filename> and
181 <filename class='directory'>/etc</filename>.
182 </para>
183
184 </sect2>
185
186 <sect2 role="configuration">
187 <title>Configuring vsftpd</title>
188
189 <sect3 id="vsftpd-config">
190 <title>Config Files</title>
191
192 <para>
193 <filename>/etc/vsftpd.conf</filename>
194 </para>
195
196 <indexterm zone="vsftpd vsftpd-config">
197 <primary sortas="e-etc-vsftpd.conf">/etc/vsftpd.conf</primary>
198 </indexterm>
199
200 </sect3>
201
202 <sect3>
203 <title>Configuration Information</title>
204
205 <para>
206 <application>vsftpd</application> comes with a basic
207 anonymous-only configuration file that was copied to
208 <filename class='directory'>/etc</filename> above. While still as
209 <systemitem class="username">root</systemitem>, this file should be
210 modified because it is now recommended to run <command>vsftpd</command>
211 in standalone mode. Also, you
212 should specify the privilege separation user created above. Finally,
213 you should specify the <command>chroot</command> directory.
214 <command>man vsftpd.conf</command> will give you all the details.
215 </para>
216
217<screen role="root"><userinput>cat &gt;&gt; /etc/vsftpd.conf &lt;&lt; "EOF"
218<literal>background=YES
219listen=YES
220nopriv_user=vsftpd
221secure_chroot_dir=&vsftpd-empty;</literal>
222EOF</userinput></screen>
223
224 <!-- recheck this issue when vsftpd is updated -->
225 <para>
226 The vsftpd daemon uses seccomp to improve security by default.
227 But it's known to cause vsftpd unable to handle ftp
228 <literal>LIST</literal> command with recent kernel versions. Append
229 a line to <filename>/etc/vsftpd.conf</filename> (as the
230 <systemitem class="username">root</systemitem> user) to disable
231 seccomp and workaround this issue:
232 </para>
233
234<screen role="root"><userinput>cat &gt;&gt; /etc/vsftpd.conf &lt;&lt; "EOF"
235<literal>seccomp_sandbox=NO</literal>
236EOF</userinput></screen>
237
238 <para>
239 To enable local logins, append the following to the
240 <filename>/etc/vsftpd.conf</filename> file (as the
241 <systemitem class="username">root</systemitem> user):
242 </para>
243
244<screen role="root"><userinput>cat &gt;&gt; /etc/vsftpd.conf &lt;&lt; "EOF"
245<literal>local_enable=YES</literal>
246EOF</userinput></screen>
247
248 <para>
249 In addition, if using <application>Linux-PAM</application> and
250 <application>vsftpd</application> with local user logins, you will need
251 a <application>Linux-PAM</application> configuration file. As the
252 <systemitem class="username">root</systemitem> user, create the
253 <filename>/etc/pam.d/vsftpd</filename> file, and add the needed
254 configuration changes for <application>Linux-PAM</application> session
255 support using the following commands:
256 </para>
257
258<screen role="root"><userinput>cat &gt; /etc/pam.d/vsftpd &lt;&lt; "EOF" &amp;&amp;
259<literal># Begin /etc/pam.d/vsftpd
260auth required /lib/security/pam_listfile.so item=user sense=deny \
261 file=/etc/ftpusers \
262 onerr=succeed
263auth required pam_shells.so
264auth include system-auth
265account include system-account
266session include system-session</literal>
267EOF
268
269cat &gt;&gt; /etc/vsftpd.conf &lt;&lt; "EOF"
270<literal>session_support=YES
271pam_service_name=vsftpd</literal>
272EOF</userinput></screen>
273
274 </sect3>
275
276 <sect3 id="vsftpd-init">
277 <title><phrase revision="sysv">Boot Script</phrase>
278 <phrase revision="systemd">Systemd Unit</phrase></title>
279
280 <para>
281 Install the
282 <phrase revision="sysv"><filename>/etc/rc.d/init.d/vsftpd</filename>
283 init script</phrase>
284 <phrase revision="systemd"><filename>vsftpd.service</filename>
285 unit</phrase> included in the
286 <xref linkend="bootscripts" revision="sysv"/>
287 <xref linkend="systemd-units" revision="systemd"/> package:
288 </para>
289
290<screen role="root"><userinput>make install-vsftpd</userinput></screen>
291
292 </sect3>
293
294 </sect2>
295
296 <sect2 role="content">
297 <title>Contents</title>
298
299 <segmentedlist>
300 <segtitle>Installed Program</segtitle>
301 <segtitle>Installed Libraries</segtitle>
302 <segtitle>Installed Directories</segtitle>
303
304 <seglistitem>
305 <seg>vsftpd</seg>
306 <seg>None</seg>
307 <seg>/usr/share/vsftpd, /home/ftp</seg>
308 </seglistitem>
309 </segmentedlist>
310
311 <variablelist>
312 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
313 <?dbfo list-presentation="list"?>
314 <?dbhtml list-presentation="table"?>
315
316 <varlistentry id="vsftpd-prog">
317 <term><command>vsftpd</command></term>
318 <listitem>
319 <para>
320 is the FTP daemon
321 </para>
322 <indexterm zone="vsftpd vsftpd-prog">
323 <primary sortas="b-vsftpd">vsftpd</primary>
324 </indexterm>
325 </listitem>
326 </varlistentry>
327
328 </variablelist>
329
330 </sect2>
331
332</sect1>
Note: See TracBrowser for help on using the repository browser.