source: server/major/vsftpd.xml@ 443b085

10.0 10.1 11.0 11.1 11.2 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind lazarus perl-modules qt5new trunk upgradedb xry111/intltool xry111/soup3 xry111/test-20220226
Last change on this file since 443b085 was 443b085, checked in by Bruce Dubbs <bdubbs@…>, 6 years ago

Tags for servers

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

  • Property mode set to 100644
File size: 9.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>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.</para>
36
37 &lfs80_checked;
38
39 <bridgehead renderas="sect3">Package Information</bridgehead>
40 <itemizedlist spacing="compact">
41 <listitem>
42 <para>Download (HTTP): <ulink url="&vsftpd-download-http;"/></para>
43 </listitem>
44 <listitem>
45 <para>Download (FTP): <ulink url="&vsftpd-download-ftp;"/></para>
46 </listitem>
47 <listitem>
48 <para>Download MD5 sum: &vsftpd-md5sum;</para>
49 </listitem>
50 <listitem>
51 <para>Download size: &vsftpd-size;</para>
52 </listitem>
53 <listitem>
54 <para>Estimated disk space required: &vsftpd-buildsize;</para>
55 </listitem>
56 <listitem>
57 <para>Estimated build time: &vsftpd-time;</para>
58 </listitem>
59 </itemizedlist>
60
61 <bridgehead renderas="sect3">vsftpd Dependencies</bridgehead>
62
63 <bridgehead renderas="sect4">Optional</bridgehead>
64 <para role="optional">
65 <xref linkend="libcap-pam"/>,
66 <xref linkend="linux-pam"/>, and
67 <xref linkend="openssl"/>
68 </para>
69
70 <para condition="html" role="usernotes">User Notes:
71 <ulink url="&blfs-wiki;/vsftpd"/></para>
72
73 </sect2>
74
75 <sect2 role="installation">
76 <title>Installation of vsftpd</title>
77
78 <para>For security reasons, running <application>vsftpd</application>
79 as an unprivileged user and group is encouraged. Also, a user should be
80 created to map anonymous users. As the <systemitem
81 class="username">root</systemitem> user, create the needed directories,
82 users, and groups with the following commands:</para>
83
84<screen role="root"><userinput>install -v -d -m 0755 &vsftpd-empty; &amp;&amp;
85install -v -d -m 0755 /home/ftp &amp;&amp;
86groupadd -g 47 vsftpd &amp;&amp;
87groupadd -g 45 ftp &amp;&amp;
88
89useradd -c "vsftpd User" -d /dev/null -g vsftpd -s /bin/false -u 47 vsftpd &amp;&amp;
90useradd -c anonymous_user -d /home/ftp -g ftp -s /bin/false -u 45 ftp</userinput></screen>
91<!--
92 <para>If you did not install the optional <application>libcap2</application> package,
93 run the following to avoid a build error:</para>
94
95<screen><userinput>sed -i -e 's|#define VSF_SYSDEP_HAVE_LIBCAP|//&amp;|' sysdeputil.c</userinput></screen>-->
96
97 <para>Build <application>vsftpd</application> as an unprivileged user
98 using the following command:</para>
99
100<screen><userinput>make</userinput></screen>
101
102 <para>This package does not come with a test suite.</para>
103
104 <para>Once again, become the <systemitem class="username">root</systemitem>
105 user and install <application>vsftpd</application> with the following
106 commands:</para>
107
108<screen role="root"><userinput>install -v -m 755 vsftpd /usr/sbin/vsftpd &amp;&amp;
109install -v -m 644 vsftpd.8 /usr/share/man/man8 &amp;&amp;
110install -v -m 644 vsftpd.conf.5 /usr/share/man/man5 &amp;&amp;
111install -v -m 644 vsftpd.conf /etc</userinput></screen>
112
113 </sect2>
114
115 <sect2 role="commands">
116 <title>Command Explanations</title>
117
118 <para><command>install -v -d ...</command>: This creates the
119 directory that anonymous users will use (<filename
120 class='directory'>/home/ftp</filename>)
121 and the directory the daemon will chroot into
122 (<filename class='directory'>&vsftpd-empty;</filename>).</para>
123
124 <note>
125 <para><filename class="directory">/home/ftp</filename> should not be
126 owned by the user <systemitem class="username">vsftpd</systemitem>,
127 or the user <systemitem class="username">ftp</systemitem>.</para>
128 </note>
129
130 <para><command>echo "#define VSF_BUILD_TCPWRAPPERS" >>builddefs.h</command>:
131 Use this prior to <command>make</command> to add support for
132 <application>tcpwrappers</application>.</para>
133
134 <para><command>echo "#define VSF_BUILD_SSL" >>builddefs.h</command>:
135 Use this prior to <command>make</command> to add support for SSL.</para>
136
137 <para><command>install -v -m ...</command>:
138 The <filename>Makefile</filename> uses non-standard installation paths.
139 These commands install the files in
140 <filename class='directory'>/usr</filename> and
141 <filename class='directory'>/etc</filename>.</para>
142
143 </sect2>
144
145 <sect2 role="configuration">
146 <title>Configuring vsftpd</title>
147
148 <sect3 id="vsftpd-config">
149 <title>Config Files</title>
150
151 <para><filename>/etc/vsftpd.conf</filename></para>
152
153 <indexterm zone="vsftpd vsftpd-config">
154 <primary sortas="e-etc-vsftpd.conf">/etc/vsftpd.conf</primary>
155 </indexterm>
156
157 </sect3>
158
159 <sect3>
160 <title>Configuration Information</title>
161
162 <para><application>vsftpd</application> comes with a basic
163 anonymous-only configuration file that was copied to
164 <filename class='directory'>/etc</filename> above. While still as
165 <systemitem class="username">root</systemitem>, this file should be
166 modified because it is now recommended to run <command>vsftpd</command>
167 in standalone mode. <!-- as opposed to
168 <command>inetd</command>/<command>xinetd</command> mode. -->Also, you
169 should specify the privilege separation user created above. Finally,
170 you should specify the <command>chroot</command> directory.
171 <command>man vsftpd.conf</command> will give you all the details.</para>
172
173<screen role="root"><userinput>cat &gt;&gt; /etc/vsftpd.conf &lt;&lt; "EOF"
174<literal>background=YES
175listen=YES
176nopriv_user=vsftpd
177secure_chroot_dir=&vsftpd-empty;</literal>
178EOF</userinput></screen>
179
180 <para>To enable local logins, append the following to the
181 <filename>/etc/vsftpd.conf</filename> file (as the
182 <systemitem class="username">root</systemitem> user):</para>
183
184<screen role="root"><userinput>cat &gt;&gt; /etc/vsftpd.conf &lt;&lt; "EOF"
185<literal>local_enable=YES</literal>
186EOF</userinput></screen>
187
188 <para>In addition, if using <application>Linux-PAM</application> and
189 <application>vsftpd</application> with local user logins, you will need
190 a <application>Linux-PAM</application> configuration file. As the
191 <systemitem class="username">root</systemitem> user, create the
192 <filename>/etc/pam.d/vsftpd</filename> file, and add the needed
193 configuration changes for <application>Linux-PAM</application> session
194 support using the following commands:</para>
195
196<screen role="root"><userinput>cat &gt; /etc/pam.d/vsftpd &lt;&lt; "EOF" &amp;&amp;
197<literal># Begin /etc/pam.d/vsftpd
198auth required /lib/security/pam_listfile.so item=user sense=deny \
199 file=/etc/ftpusers \
200 onerr=succeed
201auth required pam_shells.so
202auth include system-auth
203account include system-account
204session include system-session</literal>
205EOF
206
207cat &gt;&gt; /etc/vsftpd.conf &lt;&lt; "EOF"
208<literal>session_support=YES
209pam_service_name=vsftpd</literal>
210EOF</userinput></screen>
211
212 </sect3>
213
214 <sect3 id="vsftpd-init">
215 <title><phrase revision="sysv">Boot Script</phrase>
216 <phrase revision="systemd">Systemd Unit</phrase></title>
217
218 <para>Install the
219 <phrase revision="sysv"><filename>/etc/rc.d/init.d/vsftpd</filename> init
220 script</phrase>
221 <phrase revision="systemd"><filename>vsftpd.service</filename>
222 unit</phrase> included in the
223 <xref linkend="bootscripts" revision="sysv"/>
224 <xref linkend="systemd-units" revision="systemd"/> package.</para>
225
226<screen role="root"><userinput>make install-vsftpd</userinput></screen>
227
228 </sect3>
229
230 </sect2>
231
232 <sect2 role="content">
233 <title>Contents</title>
234
235 <segmentedlist>
236 <segtitle>Installed Program</segtitle>
237 <segtitle>Installed Libraries</segtitle>
238 <segtitle>Installed Directories</segtitle>
239
240 <seglistitem>
241 <seg>vsftpd</seg>
242 <seg>None</seg>
243 <seg>/usr/share/vsftpd, /home/ftp</seg>
244 </seglistitem>
245 </segmentedlist>
246
247 <variablelist>
248 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
249 <?dbfo list-presentation="list"?>
250 <?dbhtml list-presentation="table"?>
251
252 <varlistentry id="vsftpd-prog">
253 <term><command>vsftpd</command></term>
254 <listitem>
255 <para>is the FTP daemon.</para>
256 <indexterm zone="vsftpd vsftpd-prog">
257 <primary sortas="b-vsftpd">vsftpd</primary>
258 </indexterm>
259 </listitem>
260 </varlistentry>
261
262 </variablelist>
263
264 </sect2>
265
266</sect1>
Note: See TracBrowser for help on using the repository browser.