ProFTPD

An FTP daemon for Unix/Linux

OLUG

March 5th 2002

Jon Larsen

Network Administrator

CAS, Inc.

relayer@omahadirect.net

Contents

Introduction

Get the Software

Compile and Install

Configuration

Links

Advanced Topics

Introduction

ProFTPd is a GPLed, sophisticated replacement for many FTP daemons for UNIX/Linux.

It's strengths include:

highly configurable using Apache-style directives

Connection and Transfer Rate limitations

SQL connectivity

Many Linux Distributors use ProFTPd as their own FTP server.

Both TAR and RPM, source and binaries are available.

Get the Software

ProFTPd can be obtained from the project's main web site.

http://www.proftpd.org

or using an ftp client

ftp://ftp.proftpd.org/distrib/source/proftpd-1.2.4.tar.gz

Unpack your tar.gz

tar -xzvf proftpd-1.2.4.tar.gz

Change into the newly created folder

cd proftpd-1.2.4/

Compile and Install

ProFTPd uses the configure script to automatically determine your build environment, as well as general defaults.

For our purposes of installation to Linux, we will enable more declarations to enhance the capabilities of ProFTPd

./configure --prefix=/usr/local --enable-shadow --enable-pam --with-modules=mod_linuxprivs:mod_readme:mod_pam

Compile:

make

Install as root:

make install

Compilation Hint: Create a shell script call proconf.sh.

In it put:

#!/bin/sh

./configure --prefix=/usr/local --enable-shadow --enable-pam\

--with-modules=mod_linuxprivs:mod_readme:mod_pam

Save it in a safe place. On the next release of ProFTPd, grab your proconf.sh script, run it from the proftpd-x.x.x dir, compile, and install. You'll run less of a chance of forgetting a module you used. Always update your proconf.sh script if you change features of your ProFTPd install.

(I use this same technique for Qpopper on new releases - Qpopper has lots of configure declarations.)

ProFTPd will install a default proftpd.conf file. In our example it is located in /usr/local/etc

The configuration file is similar to the Apache http.conf. It is seperated into Sections - Global, Anonymous, Virtual

A list of directives is available at

http://www.proftpd.org/docs/directives/configuration_full.html

Configuration

There are two operating modes, Standalone and inetd. We'll use inetd to replace the existing

WU-ftp.

ServerName	"ProFTPD Default Installation"

ServerType	inetd

DefaultServer	on

Change the ServerType from standalone to inetd

Create a group called nogroup

groupadd nogroup

You can also change the user and group to your liking by changing the directives in the <Global> section:

User	nobody

Group	nogroup

The sample proftpd.conf file provides anonymous access.

Changing Xinetd to Run ProFTPd

cp /etc/xinetd.d/wu-ftpd /etc/xinetd.d/proftpd

vi /etc/xinetd.d/proftpd

Change

server	= /usr/sbin/in.wu-ftpd

to

server = /usr/local/sbin/in.proftpd

Delete server_args directive

Restart xinetd

Links

Project Website - http://www.proftpd.org

Xinetd Website - http://www.xinetd.org

FTP RFC - http://www.rfc-editor.org/rfc/rfc959.txt

Advanced Topics

MySQL, Postgresql, LDAP modules are available for user authentication.

Jon Larsen

2002-02-10T11:48:18

Jon Larsen