source: server/major/vsftpd.xml@ 9214104

10.0 10.1 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 9214104 was 9214104, checked in by Pierre Labastie <pieere@…>, 4 years ago

Last fixes for GCC 10:

  • patch boost to help libreoffice
  • patch libreoffice
  • fix multiple def in rox-filer
  • fix implicit type cas in vsftpd (sed by thomas)

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@23151 af4574ff-66df-0310-9fd7-8a98e5e911e0

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