source: server/major/vsftpd.xml@ 987ebfb

11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 987ebfb was 987ebfb, checked in by Thomas Trepl (Moody) <thomas@…>, 3 years ago

Tags

  • 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 "efbf362a65bec771bc15ad311f5a982e">
10 <!ENTITY vsftpd-size "210 KB">
11 <!ENTITY vsftpd-buildsize "1.9 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 &lfs110a_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
219nopriv_user=vsftpd
220secure_chroot_dir=&vsftpd-empty;</literal>
221EOF</userinput></screen>
222
223 <!-- recheck this issue when vsftpd is updated -->
224 <para>
225 The vsftpd daemon uses seccomp to improve security by default.
226 But it's known to cause vsftpd unable to handle ftp
227 <literal>LIST</literal> command with recent kernel versions. Append
228 a line to <filename>/etc/vsftpd.conf</filename> (as the
229 <systemitem class="username">root</systemitem> user) to disable
230 seccomp and workaround this issue:
231 </para>
232
233<screen role="root"><userinput>cat &gt;&gt; /etc/vsftpd.conf &lt;&lt; "EOF"
234<literal>seccomp_sandbox=NO</literal>
235EOF</userinput></screen>
236
237 <para>
238 To enable local logins, append the following to the
239 <filename>/etc/vsftpd.conf</filename> file (as the
240 <systemitem class="username">root</systemitem> user):
241 </para>
242
243<screen role="root"><userinput>cat &gt;&gt; /etc/vsftpd.conf &lt;&lt; "EOF"
244<literal>local_enable=YES</literal>
245EOF</userinput></screen>
246
247 <para>
248 In addition, if using <application>Linux-PAM</application> and
249 <application>vsftpd</application> with local user logins, you will need
250 a <application>Linux-PAM</application> configuration file. As the
251 <systemitem class="username">root</systemitem> user, create the
252 <filename>/etc/pam.d/vsftpd</filename> file, and add the needed
253 configuration changes for <application>Linux-PAM</application> session
254 support using the following commands:
255 </para>
256
257<screen role="root"><userinput>cat &gt; /etc/pam.d/vsftpd &lt;&lt; "EOF" &amp;&amp;
258<literal># Begin /etc/pam.d/vsftpd
259auth required /lib/security/pam_listfile.so item=user sense=deny \
260 file=/etc/ftpusers \
261 onerr=succeed
262auth required pam_shells.so
263auth include system-auth
264account include system-account
265session include system-session</literal>
266EOF
267
268cat &gt;&gt; /etc/vsftpd.conf &lt;&lt; "EOF"
269<literal>session_support=YES
270pam_service_name=vsftpd</literal>
271EOF</userinput></screen>
272
273 </sect3>
274
275 <sect3 id="vsftpd-init">
276 <title><phrase revision="sysv">Boot Script</phrase>
277 <phrase revision="systemd">Systemd Unit</phrase></title>
278
279 <para>
280 Install the
281 <phrase revision="sysv"><filename>/etc/rc.d/init.d/vsftpd</filename>
282 init script</phrase>
283 <phrase revision="systemd"><filename>vsftpd.service</filename>
284 unit</phrase> included in the
285 <xref linkend="bootscripts" revision="sysv"/>
286 <xref linkend="systemd-units" revision="systemd"/> package:
287 </para>
288
289<screen role="root"><userinput>make install-vsftpd</userinput></screen>
290
291 </sect3>
292
293 </sect2>
294
295 <sect2 role="content">
296 <title>Contents</title>
297
298 <segmentedlist>
299 <segtitle>Installed Program</segtitle>
300 <segtitle>Installed Libraries</segtitle>
301 <segtitle>Installed Directories</segtitle>
302
303 <seglistitem>
304 <seg>vsftpd</seg>
305 <seg>None</seg>
306 <seg>/usr/share/vsftpd, /home/ftp</seg>
307 </seglistitem>
308 </segmentedlist>
309
310 <variablelist>
311 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
312 <?dbfo list-presentation="list"?>
313 <?dbhtml list-presentation="table"?>
314
315 <varlistentry id="vsftpd-prog">
316 <term><command>vsftpd</command></term>
317 <listitem>
318 <para>
319 is the FTP daemon
320 </para>
321 <indexterm zone="vsftpd vsftpd-prog">
322 <primary sortas="b-vsftpd">vsftpd</primary>
323 </indexterm>
324 </listitem>
325 </varlistentry>
326
327 </variablelist>
328
329 </sect2>
330
331</sect1>
Note: See TracBrowser for help on using the repository browser.