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

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 45ab6c7 was 45ab6c7, checked in by Xi Ruoyao <xry111@…>, 3 years ago

more SVN prop clean up

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

  • Property mode set to 100644
File size: 10.5 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 " ">
[73fe507]9 <!ENTITY vsftpd-md5sum "da119d084bd3f98664636ea05b5bb398">
[59c4cab]10 <!ENTITY vsftpd-size "196 KB">
[73fe507]11 <!ENTITY vsftpd-buildsize "2 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 <sect1info>
20 <date>$Date$</date>
21 </sect1info>
22
[32ccdf34]23 <title>vsftpd-&vsftpd-version;</title>
[f8ff412]24
25 <indexterm zone="vsftpd">
[32ccdf34]26 <primary sortas="a-vsftpd">vsftpd</primary>
[f8ff412]27 </indexterm>
28
[4e82a189]29 <sect2 role="package">
[32ccdf34]30 <title>Introduction to vsftpd</title>
[f8ff412]31
[4472e923]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>
[f8ff412]37
[a57b443]38 &lfs101_checked;
[5f2eb36]39
[f8ff412]40 <bridgehead renderas="sect3">Package Information</bridgehead>
41 <itemizedlist spacing="compact">
42 <listitem>
[4472e923]43 <para>
44 Download (HTTP): <ulink url="&vsftpd-download-http;"/>
45 </para>
[f8ff412]46 </listitem>
47 <listitem>
[4472e923]48 <para>
49 Download (FTP): <ulink url="&vsftpd-download-ftp;"/>
50 </para>
[f8ff412]51 </listitem>
52 <listitem>
[4472e923]53 <para>
54 Download MD5 sum: &vsftpd-md5sum;
55 </para>
[f8ff412]56 </listitem>
57 <listitem>
[4472e923]58 <para>
59 Download size: &vsftpd-size;
60 </para>
[f8ff412]61 </listitem>
62 <listitem>
[4472e923]63 <para>
64 Estimated disk space required: &vsftpd-buildsize;
65 </para>
[f8ff412]66 </listitem>
67 <listitem>
[4472e923]68 <para>
69 Estimated build time: &vsftpd-time;
70 </para>
[f8ff412]71 </listitem>
72 </itemizedlist>
73
[32ccdf34]74 <bridgehead renderas="sect3">vsftpd Dependencies</bridgehead>
[f8ff412]75
[fa5ba12]76 <bridgehead renderas="sect4">Required</bridgehead>
77 <para role="required">
78 <xref linkend="libnsl"/>
79 </para>
80
[5aac6876]81 <bridgehead renderas="sect4">Recommended</bridgehead>
82 <para role="recommended">
83 <xref linkend="linux-pam"/>
84 </para>
85
[f8ff412]86 <bridgehead renderas="sect4">Optional</bridgehead>
[e79ed72]87 <para role="optional">
[5aac6876]88 <xref linkend="libcap-pam"/>
[e79ed72]89 </para>
[f8ff412]90
[3cb0c57]91 <para condition="html" role="usernotes">User Notes:
92 <ulink url="&blfs-wiki;/vsftpd"/></para>
93
[f8ff412]94 </sect2>
95
96 <sect2 role="installation">
[32ccdf34]97 <title>Installation of vsftpd</title>
[f8ff412]98
[4472e923]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>
[f8ff412]106
[620b04a]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;
[283bd88]111
[5f2eb36]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>
[d7c8734]114
[9214104]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
[4472e923]122 <para>
123 Build <application>vsftpd</application> as an unprivileged user
124 using the following command:
125 </para>
[d7c8734]126
[939e5f5]127<screen><userinput>make</userinput></screen>
128
[4472e923]129 <para>
130 This package does not come with a test suite.
131 </para>
[81d09ea]132
[4472e923]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>
[939e5f5]138
[1c7e5c8a]139<screen role="root"><userinput>install -v -m 755 vsftpd /usr/sbin/vsftpd &amp;&amp;
[5f2eb36]140install -v -m 644 vsftpd.8 /usr/share/man/man8 &amp;&amp;
[f8ff412]141install -v -m 644 vsftpd.conf.5 /usr/share/man/man5 &amp;&amp;
[5f2eb36]142install -v -m 644 vsftpd.conf /etc</userinput></screen>
[d7c8734]143
[f8ff412]144 </sect2>
[d7c8734]145
[f8ff412]146 <sect2 role="commands">
147 <title>Command Explanations</title>
[d7c8734]148
[4472e923]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>
[d7c8734]156
[f8ff412]157 <note>
[4472e923]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>
[f8ff412]163 </note>
[d7c8734]164
[4472e923]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>
[d7c8734]170
[4472e923]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>
[d7c8734]175
[4472e923]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>
[d7c8734]183
[f8ff412]184 </sect2>
[d7c8734]185
[f8ff412]186 <sect2 role="configuration">
[32ccdf34]187 <title>Configuring vsftpd</title>
[d7c8734]188
[f8ff412]189 <sect3 id="vsftpd-config">
190 <title>Config Files</title>
[1586494]191
[4472e923]192 <para>
193 <filename>/etc/vsftpd.conf</filename>
194 </para>
[d7c8734]195
[f8ff412]196 <indexterm zone="vsftpd vsftpd-config">
197 <primary sortas="e-etc-vsftpd.conf">/etc/vsftpd.conf</primary>
198 </indexterm>
[d7c8734]199
[f8ff412]200 </sect3>
[d7c8734]201
[f8ff412]202 <sect3>
203 <title>Configuration Information</title>
[d7c8734]204
[4472e923]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>
[f8ff412]216
217<screen role="root"><userinput>cat &gt;&gt; /etc/vsftpd.conf &lt;&lt; "EOF"
218<literal>background=YES
[d7c8734]219listen=YES
220nopriv_user=vsftpd
[620b04a]221secure_chroot_dir=&vsftpd-empty;</literal>
[21a30d1]222EOF</userinput></screen>
223
224 <!-- recheck this issue when vsftpd is updated -->
[4472e923]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>
[21a30d1]233
234<screen role="root"><userinput>cat &gt;&gt; /etc/vsftpd.conf &lt;&lt; "EOF"
235<literal>seccomp_sandbox=NO</literal>
[ee92087f]236EOF</userinput></screen>
237
[4472e923]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>
[ee92087f]243
[1dd7b0ae]244<screen role="root"><userinput>cat &gt;&gt; /etc/vsftpd.conf &lt;&lt; "EOF"
[ee92087f]245<literal>local_enable=YES</literal>
246EOF</userinput></screen>
247
[4472e923]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>
[ee92087f]257
[1dd7b0ae]258<screen role="root"><userinput>cat &gt; /etc/pam.d/vsftpd &lt;&lt; "EOF" &amp;&amp;
[ee92087f]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>
[f8ff412]272EOF</userinput></screen>
[d7c8734]273
[f8ff412]274 </sect3>
[d7c8734]275
[f8ff412]276 <sect3 id="vsftpd-init">
[ee92087f]277 <title><phrase revision="sysv">Boot Script</phrase>
278 <phrase revision="systemd">Systemd Unit</phrase></title>
279
[4472e923]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>
[d7c8734]289
[f8ff412]290<screen role="root"><userinput>make install-vsftpd</userinput></screen>
[d7c8734]291
[f8ff412]292 </sect3>
[d7c8734]293
[f8ff412]294 </sect2>
[d7c8734]295
[f8ff412]296 <sect2 role="content">
297 <title>Contents</title>
[d7c8734]298
[f8ff412]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>
[523c6e95]307 <seg>/usr/share/vsftpd, /home/ftp</seg>
[f8ff412]308 </seglistitem>
309 </segmentedlist>
310
311 <variablelist>
312 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
313 <?dbfo list-presentation="list"?>
314 <?dbhtml list-presentation="table"?>
[d7c8734]315
[f8ff412]316 <varlistentry id="vsftpd-prog">
317 <term><command>vsftpd</command></term>
318 <listitem>
[4472e923]319 <para>
[4c24eb0a]320 is the FTP daemon
[4472e923]321 </para>
[f8ff412]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.