source: server/major/vsftpd.xml@ 4830ec3

12.0 12.1 gimp3 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18
Last change on this file since 4830ec3 was 14891a90, checked in by Xi Ruoyao <xry111@…>, 13 months ago

treewide: More "User Notes" clean up

Remove links to pages w/o real contents.

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