source: server/major/vsftpd-systemd.xml@ e7323262

systemd-11177
Last change on this file since e7323262 was e7323262, checked in by Krejzi <krejzi@…>, 10 years ago

Remove references to libcap-pam from packages as nothing needs the pam module. libcap is in LFS.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@13896 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 7.8 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 " ">
8 <!ENTITY vsftpd-download-ftp "https://security.appspot.com/downloads/vsftpd-&vsftpd-version;.tar.gz">
9 <!ENTITY vsftpd-md5sum "8b00c749719089401315bd3c44dddbb2">
10 <!ENTITY vsftpd-size "196 KB">
11 <!ENTITY vsftpd-buildsize "1.8 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 &lfs75_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="linux-pam"/> and
66 <xref linkend="openssl"/>
67 </para>
68
69 <para condition="html" role="usernotes">User Notes:
70 <ulink url="&blfs-wiki;/vsftpd"/></para>
71
72 </sect2>
73
74 <sect2 role="installation">
75 <title>Installation of vsftpd</title>
76
77 <para>For security reasons, running <application>vsftpd</application>
78 as an unprivileged user and group is encouraged. Also, a user should be
79 created to map anonymous users. As the <systemitem
80 class="username">root</systemitem> user, create the needed directories,
81 users, and groups with the following commands:</para>
82
83<screen role="root"><userinput>install -v -d -m 0755 &vsftpd-empty; &amp;&amp;
84install -v -d -m 0755 /home/ftp &amp;&amp;
85groupadd -g 47 vsftpd &amp;&amp;
86groupadd -g 45 ftp &amp;&amp;
87
88useradd -c "vsftpd User" -d /dev/null -g vsftpd -s /bin/false -u 47 vsftpd &amp;&amp;
89useradd -c anonymous_user -d /home/ftp -g ftp -s /bin/false -u 45 ftp</userinput></screen>
90
91 <para>If you did not install the optional <application>libcap2</application> package,
92 run the following to avoid a build error:</para>
93
94<screen><userinput>sed -i -e 's|#define VSF_SYSDEP_HAVE_LIBCAP|//&amp;|' sysdeputil.c</userinput></screen>
95
96 <para>Build <application>vsftpd</application> as an unprivileged user
97 using the following command:</para>
98
99<screen><userinput>make</userinput></screen>
100
101 <para>This package does not come with a test suite.</para>
102
103 <para>Once again, become the <systemitem class="username">root</systemitem>
104 user and install <application>vsftpd</application> with the following
105 commands:</para>
106
107<screen><userinput>install -v -m 755 vsftpd /usr/sbin/vsftpd &amp;&amp;
108install -v -m 644 vsftpd.8 /usr/share/man/man8 &amp;&amp;
109install -v -m 644 vsftpd.conf.5 /usr/share/man/man5 &amp;&amp;
110install -v -m 644 vsftpd.conf /etc</userinput></screen>
111
112 </sect2>
113
114 <sect2 role="commands">
115 <title>Command Explanations</title>
116
117 <para><command>install -v -d ...</command>: This creates the
118 directory that anonymous users will use (<filename
119 class='directory'>/home/ftp</filename>)
120 and the directory the daemon will chroot into
121 (<filename class='directory'>&vsftpd-empty;</filename>).</para>
122
123 <note>
124 <para><filename class="directory">/home/ftp</filename> should not be
125 owned by the user <systemitem class="username">vsftpd</systemitem>,
126 or the user <systemitem class="username">ftp</systemitem>.</para>
127 </note>
128
129 <para><command>echo "#define VSF_BUILD_TCPWRAPPERS" >>builddefs.h</command>:
130 Use this prior to <command>make</command> to add support for
131 <application>tcpwrappers</application>.</para>
132
133 <para><command>echo "#define VSF_BUILD_SSL" >>builddefs.h</command>:
134 Use this prior to <command>make</command> to add support for SSL.</para>
135
136 <para><command>install -v -m ...</command>:
137 The <filename>Makefile</filename> uses non-standard installation paths.
138 These commands install the files in
139 <filename class='directory'>/usr</filename> and
140 <filename class='directory'>/etc</filename>.</para>
141
142 </sect2>
143
144 <sect2 role="configuration">
145 <title>Configuring vsftpd</title>
146
147 <sect3 id="vsftpd-config">
148 <title>Config Files</title>
149
150 <para><filename>/etc/vsftpd.conf</filename></para>
151
152 <indexterm zone="vsftpd vsftpd-config">
153 <primary sortas="e-etc-vsftpd.conf">/etc/vsftpd.conf</primary>
154 </indexterm>
155
156 </sect3>
157
158 <sect3>
159 <title>Configuration Information</title>
160
161 <para><application>vsftpd</application> comes with a basic
162 anonymous-only configuration file that was copied to
163 <filename class='directory'>/etc</filename> above. While still as
164 <systemitem class="username">root</systemitem>, this file should be
165 modified because it is now recommended to run <command>vsftpd</command>
166 in standalone mode. <!-- as opposed to
167 <command>inetd</command>/<command>xinetd</command> mode. -->Also, you
168 should specify the privilege separation user created above. Finally,
169 you should specify the <command>chroot</command> directory.
170 <command>man vsftpd.conf</command> will give you all the details.</para>
171
172<screen role="root"><userinput>cat &gt;&gt; /etc/vsftpd.conf &lt;&lt; "EOF"
173<literal>background=YES
174listen=YES
175nopriv_user=vsftpd
176secure_chroot_dir=&vsftpd-empty;</literal>
177EOF</userinput></screen>
178
179 </sect3>
180
181 <sect3 id="vsftpd-init">
182 <title>Systemd Units</title>
183
184 <para>
185 To start the <command>vsftpd</command> daemon at boot,
186 install the systemd unit from the <xref linkend="bootscripts"/>
187 package by running the following command as the
188 <systemitem class="username">root</systemitem> user:
189 </para>
190
191<screen role="root"><userinput>make install-vsftpd</userinput></screen>
192
193 </sect3>
194
195 </sect2>
196
197 <sect2 role="content">
198 <title>Contents</title>
199
200 <segmentedlist>
201 <segtitle>Installed Program</segtitle>
202 <segtitle>Installed Libraries</segtitle>
203 <segtitle>Installed Directories</segtitle>
204
205 <seglistitem>
206 <seg>vsftpd</seg>
207 <seg>None</seg>
208 <seg>//usr/share/vsftpd, /home/ftp</seg>
209 </seglistitem>
210 </segmentedlist>
211
212 <variablelist>
213 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
214 <?dbfo list-presentation="list"?>
215 <?dbhtml list-presentation="table"?>
216
217 <varlistentry id="vsftpd-prog">
218 <term><command>vsftpd</command></term>
219 <listitem>
220 <para>is the FTP daemon.</para>
221 <indexterm zone="vsftpd vsftpd-prog">
222 <primary sortas="b-vsftpd">vsftpd</primary>
223 </indexterm>
224 </listitem>
225 </varlistentry>
226
227 </variablelist>
228
229 </sect2>
230
231</sect1>
Note: See TracBrowser for help on using the repository browser.