ProFTPD-1.2.10

Introduction to ProFTPD

The ProFTPD package contains a secure and highly configurable FTP daemon. This is useful for serving large file archives over a network.

Package information

ProFTPD dependencies

Optional

Linux-PAM-0.78

Installation of ProFTPD

For security reasons, you should install ProFTPD using an unprivileged user and group. As the root user:

groupadd proftpd &&
useradd -c proftpd -d /home/ftp -g proftpd \
        -s /usr/lib/proftpd/proftpdshell proftpd &&
install -d -m775 -o proftpd -g proftpd /usr/lib/proftpd &&
ln -s /bin/false /usr/lib/proftpd/proftpdshell &&
echo /usr/lib/proftpd/proftpdshell >> /etc/shells

Install ProFTPD as a regular user by running the following commands:

install_user=proftpd install_group=proftpd \
    ./configure --prefix=/usr --sysconfdir=/etc \
    --localstatedir=/var/run &&
make

Now, again as the root user:

make install

Command explanations

install -d -m775 -o proftpd -g proftpd /usr/lib/proftpd: Create the home directory for ProFTPD.

ln -s /bin/false /usr/lib/proftpd/proftpdshell: Set the default shell as a link to a invalid shell.

echo /usr/lib/proftpd/proftpdshell >> /etc/shells: Fake a valid shell for compatability purposes.

[Note]

Note

The above three commands can be ommitted if the following directive is placed in the configuration file:

RequireValidShell off

By default, proftpd will require that users logging in have valid shells. The RequireValidShell directive turns off this requirement. This is only recommended if you are setting up your FTP server exclusively for anonymous downloads.

install_user=proftpd install_group=proftpd: Specify the user and group identity for ProFTPD.

--sysconfdir=/etc: This prevents the configuration files from going to /usr/etc.

--localstatedir=/var/run: This uses /var/run instead of /usr/var for lock files.

Configuring ProFTPD

proftpd init.d script

Install the /etc/rc.d/init.d/proftpd init script included in the blfs-bootscripts-6.0 package.

make install-proftpd

Config files

/etc/proftpd.conf

Configuration information

This is a simple, download-only sample configuration. See the ProFTPD documentation in /usr/share/doc/proftpd and consult the website at http://www.proftpd.org/ for example configurations.

cat > /etc/proftpd.conf << "EOF"
# This is a basic ProFTPD configuration file
# It establishes a single server and a single anonymous login.

ServerName                      "ProFTPD Default Installation"
ServerType                      standalone
DefaultServer                   on

# Port 21 is the standard FTP port.
Port                            21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask                           022

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances                    30

# Set the user and group that the server normally runs at.
User                            proftpd
Group                           proftpd

# Normally, files should be overwritable.
<Directory /*>
  AllowOverwrite                on
</Directory>

# A basic anonymous configuration, no upload directories.
<Anonymous ~proftpd>
  User                          proftpd
  Group                         proftpd
  # Clients should be able to login with "anonymous" as well as "proftpd"
  UserAlias                     anonymous proftpd

  # Limit the maximum number of anonymous logins
  MaxClients                    10

  # 'welcome.msg' should be displayed at login, and '.message' displayed
  # in each newly chdired directory.
  DisplayLogin                  welcome.msg
  DisplayFirstChdir             .message

  # Limit WRITE everywhere in the anonymous chroot
  <Limit WRITE>
    DenyAll
  </Limit>
</Anonymous>
EOF

Contents

Installed Programs: ftpcount, ftpdctl, ftptop, ftpwho, ftpshut, proftpd
Installed Libraries: None
Installed Directory: /var/run/proftpd

Short Descriptions

proftpd

is the FTP daemon.

ftpcount

shows the current number of connections.

ftpshut

shuts down all proftpd servers at a given time.

ftptop

displays running status on connections.

ftpwho

shows current process information for each session.

Last updated on 2005-03-09 00:08:08 -0700