mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-03 23:07:23 +08:00
addff0a608
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3716 af4574ff-66df-0310-9fd7-8a98e5e911e0
164 lines
5.5 KiB
XML
164 lines
5.5 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
%general-entities;
|
|
|
|
<!ENTITY vsftpd-download-http " ">
|
|
<!ENTITY vsftpd-download-ftp "ftp://vsftpd.beasts.org/users/cevans/vsftpd-&vsftpd-version;.tar.gz">
|
|
<!ENTITY vsftpd-md5sum "63838791ec8b1375ed154fb2603e52e9">
|
|
<!ENTITY vsftpd-size "148 KB">
|
|
<!ENTITY vsftpd-buildsize "492 KB">
|
|
<!ENTITY vsftpd-time "0.01 SBU">
|
|
]>
|
|
|
|
<sect1 id="vsftpd" xreflabel="vsFTPD-&vsftpd-version;">
|
|
<sect1info>
|
|
<othername>$LastChangedBy$</othername>
|
|
<date>$Date$</date>
|
|
</sect1info>
|
|
<?dbhtml filename="vsftpd.html"?>
|
|
<title><application>vs<acronym>FTP</acronym>D</application>-&vsftpd-version;
|
|
</title>
|
|
|
|
<sect2>
|
|
<title>Introduction to
|
|
<application>vs<acronym>FTP</acronym>D</application></title>
|
|
|
|
<para>The <application>vs<acronym>FTP</acronym>D</application> package
|
|
contains a very secure and very small <acronym>FTP</acronym> daemon. This is
|
|
useful for serving files over a network.</para>
|
|
|
|
<sect3><title>Package information</title>
|
|
<itemizedlist spacing='compact'>
|
|
<listitem><para>Download (HTTP):
|
|
<ulink url="&vsftpd-download-http;"/></para></listitem>
|
|
<listitem><para>Download (FTP):
|
|
<ulink url="&vsftpd-download-ftp;"/></para></listitem>
|
|
<listitem><para>Download MD5 sum: &vsftpd-md5sum;</para></listitem>
|
|
<listitem><para>Download size: &vsftpd-size;</para></listitem>
|
|
<listitem><para>Estimated disk space required:
|
|
&vsftpd-buildsize;</para></listitem>
|
|
<listitem><para>Estimated build time:
|
|
&vsftpd-time;</para></listitem></itemizedlist>
|
|
</sect3>
|
|
|
|
<sect3><title><application>vsFTPD</application> dependencies</title>
|
|
<sect4><title>Optional</title>
|
|
<para><xref linkend="Linux_PAM"/>,
|
|
<xref linkend="openssl"/>, and
|
|
<xref linkend="tcpwrappers"/></para>
|
|
</sect4>
|
|
</sect3>
|
|
|
|
</sect2>
|
|
|
|
<sect2>
|
|
<title>Installation of <application>vsFTPD</application></title>
|
|
|
|
<para>For security reasons, running
|
|
<application>vs<acronym>FTP</acronym>D</application> as an unprivileged user
|
|
and group is encouraged. Also, a user to map anonymous users to should be
|
|
created.</para>
|
|
|
|
<screen><userinput><command>install -d -m 0755 /var/ftp/empty &&
|
|
install -d -m 0755 /home/ftp &&
|
|
groupadd vsftpd &&
|
|
useradd -d /dev/null -c "vsFTPD User" -g vsftpd -s /bin/false vsftpd &&
|
|
groupadd ftp &&
|
|
useradd -c anonymous_user -d /home/ftp -g ftp -s /bin/false ftp</command>
|
|
</userinput></screen>
|
|
|
|
<para>Install <application>vs<acronym>FTP</acronym>D</application> by running
|
|
the following commands:</para>
|
|
|
|
<screen><userinput><command>make &&
|
|
install -m 755 vsftpd /usr/sbin/vsftpd &&
|
|
install -m 644 vsftpd.8 /usr/share/man/man8 &&
|
|
install -m 644 vsftpd.conf.5 /usr/share/man/man5 &&
|
|
install -m 644 vsftpd.conf /etc</command></userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2>
|
|
<title>Command explanations</title>
|
|
|
|
<para><parameter>install -d [...]</parameter>: This creates the directory that
|
|
anonymous users will use (<filename class='directory'>/home/ftp</filename>)
|
|
and the directory the daemon will chroot into
|
|
(<filename class='directory'>/var/ftp/empty</filename>).</para>
|
|
|
|
<note><para><filename class="directory">/home/ftp</filename> should not be
|
|
owned by the user vsftpd, or the user ftp.</para></note>
|
|
|
|
<para><parameter>echo "#define VSF_BUILD_TCPWRAPPERS" >>builddefs.h</parameter>:
|
|
Use this prior to <command>make</command> to add support for
|
|
<application>tcpwrappers</application>.</para>
|
|
|
|
<para><parameter>echo "#define VSF_BUILD_SSL" >>builddefs.h</parameter>:
|
|
Use this prior to <command>make</command> to add support for
|
|
<acronym>SSL</acronym>.</para>
|
|
|
|
<para><parameter>install -m [...]</parameter>:
|
|
The <filename>Makefile</filename> hardwires
|
|
<filename class='directory'>/usr/local</filename> (if it exists). These
|
|
commands install the files in
|
|
<filename class='directory'>/usr</filename>.</para>
|
|
|
|
</sect2>
|
|
|
|
<sect2>
|
|
<title>Configuring <application>vs<acronym>FTP</acronym>D</application></title>
|
|
|
|
<sect3><title>vsftpd init.d script</title>
|
|
<para>Install the <filename>/etc/rc.d/init.d/vsftpd</filename>
|
|
init script included in the
|
|
<xref linkend="intro-important-bootscripts"/> package.</para>
|
|
|
|
<screen><userinput><command>make install-vsftpd</command></userinput></screen>
|
|
|
|
</sect3>
|
|
|
|
<sect3><title>Config files</title>
|
|
<para><filename>/etc/vsftpd.conf</filename></para>
|
|
</sect3>
|
|
|
|
<sect3><title>Configuration information</title>
|
|
<para><application>vs<acronym>FTP</acronym>D</application> comes with a basic
|
|
anonymous-only configuration file that was copied to
|
|
<filename class='directory'>/etc</filename> above. This file should be modified
|
|
because it is now recommended to run <command>vsftpd</command> in standalone
|
|
mode as opposed to <command>inetd</command>/<command>xinetd</command> mode.
|
|
Also, you should specify the privilege separation user created above. Finally,
|
|
you should specify the <command>chroot</command> directory.
|
|
<command>man vsftpd.conf</command> will give you all the details.</para>
|
|
|
|
<screen><userinput><command>cat >> /etc/vsftpd.conf << "EOF"</command>
|
|
background=YES
|
|
listen=YES
|
|
nopriv_user=vsftpd
|
|
secure_chroot_dir=/var/ftp/empty
|
|
<command>EOF</command></userinput></screen>
|
|
</sect3>
|
|
|
|
</sect2>
|
|
|
|
<sect2>
|
|
<title>Contents</title>
|
|
|
|
<para>The <application>vs<acronym>FTP</acronym>D</application> package contains
|
|
<command>vsftpd</command>.</para>
|
|
|
|
</sect2>
|
|
|
|
<sect2><title>Description</title>
|
|
|
|
<sect3><title>vsftpd</title>
|
|
<para><command>vsftpd</command> is the <acronym>FTP</acronym>
|
|
daemon.</para></sect3>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|
|
|