Configuring the PureFTPd Server

Strictly speaking, the actual configuration of the PureFTPd server is made purely via command line parameters passed when the server is started. The configuration file /etc/pure-ftpd.conf cannot overwrite any values here. It is evaluated by a Perl script, which creates the corresponding command line parameters from it. These are passed to the program when it starts.

The FTP server can either run as an independent service or be started via the inetd .

If PureFTPd should be started directly, this is done with the start script /etc/init.d/pure-ftpd start (or rcpure-ftpd start). The start script runs the Perl script for evaluating the configuration file and starts the server with the corresponding command line parameters. The service is ended with rcpure-ftpd stop. If the FTP server should be started automatically when the computer is booted, corresponding symbolic links must be set with insserv:

earth:~ # insserv /etc/init.d/pure-ftpd

If inetd is used to start PureFTPd, a corresponding line must be added to the file /etc/inetd.conf. The required command line options are then added at the end of the line:

ftp stream tcp nowait root /usr/sbin/tcpd pure-ftpd -A -i

In this example, PureFTPd is started by the TCP wrapper (/usr/sbin/tcpd), so here access restriction is also possible via the files /etc/hosts.allow or /etc/hosts.deny. Because the file /etc/pure-ftpd.conf is only evaluated via a Perl script, all the required options must be given to PureFTPd as command line options when it is started via the inetd.

View all the possible command line options for PureFTPd by entering pure-ftpd --help (somewhat modified here):

-1 -logpid

-4 -ipv4only

-A -chrooteveryone

-a -trustedgid gid

-b -brokenclientscompatibility

-c -maxclientsnumber

number

-B

-daemonize

-C

-maxclientsperip

number

-d

-verboselog

-D

-displaydotfiles

-e

-anonymousonly

-E

-noanonymous

-f

-syslogfacility

facility

-F

-fortunesfile

file

-g

-pidfile

path to the pid-

-file

-G

-norename

-h

-help

-H

-dontresolve

-I

-maxidletime

minutes

-i

-anonymouscantupload

-j

-createhomedir

-K

-keepallfiles

-k

-maxdiskusagepct

percentage

-l

-login

auth or auth:config -file

-L

-limitrecursion

number:number

-M

-anonymouscancreatedirs

-m

-maxload

load

-N

-natmode

-n

-quota

number of files.

■.MByte

-o

-uploadscript

-O

-altlog

format:log file

-p

-passiveportrange

minport:maxport

-P

-forcepassiveip

IP address

-q

-anonymousratio

upload

ratio : download ratio

-Q

-userratio

upload

ratio : download ratio

-r

-autorename

-R

-nochmod

-s

-antiwarez

-S

-bind

IP address

, port

-t

-anonymousbandwidth

bandwidth

(Kb/s)

-T

-userbandwidth

bandwidth

(Kb/s) or

[up Bb]

:[down Bb]

-U

-umask

mask

-u

-minuid

uid

-V

-trustedip

IP address

-w

-allowuserfxp

-W

-allowanonymousfxp

-x

-prohibitdotfileswrite

-X

-prohibitdotfilesread

-z

-allowdotfiles

A number of configuration possibilities will now be presented as examples: a few simple configurations for anonymous FTP and various configurations with user authentication.

Continue reading here: Configuring Anonymous FTP

Was this article helpful?

0 0

Responses

  • Feorie
    Where perl config pureftpd?
    3 months ago