Skip to content

Commit

Permalink
Improve PureFTPd installer
Browse files Browse the repository at this point in the history
  • Loading branch information
joglomedia committed Apr 20, 2024
1 parent 5dc09ea commit 31c92a3
Show file tree
Hide file tree
Showing 14 changed files with 627 additions and 2 deletions.
26 changes: 26 additions & 0 deletions etc/default/pure-ftpd-common
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Configuration for pure-ftpd
# (this file is sourced by /bin/sh, edit accordingly)

# STANDALONE_OR_INETD
# valid values are "standalone" and "inetd".
# Any change here overrides the setting in debconf.
STANDALONE_OR_INETD=standalone

# VIRTUALCHROOT:
# whether to use binary with virtualchroot support
# valid values are "true" or "false"
# Any change here overrides the setting in debconf.
VIRTUALCHROOT=false

# UPLOADSCRIPT: if this is set and the daemon is run in standalone mode,
# pure-uploadscript will also be run to spawn the program given below
# for handling uploads. see /usr/share/doc/pure-ftpd/README.gz or
# pure-uploadscript(8)

# example: UPLOADSCRIPT=/usr/local/sbin/uploadhandler.pl
UPLOADSCRIPT=

# if set, pure-uploadscript will spawn running as the
# given uid and gid
UPLOADUID=
UPLOADGID=
7 changes: 5 additions & 2 deletions etc/init.d/pure-ftpd
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ test -x $WRAPPER || exit 0
set -e

if [ ! -e `dirname $PIDFILE` ];then
mkdir `dirname $PIDFILE`
mkdir `dirname $PIDFILE`

# label directory correctly on SE Linux systems (#980051)
[ -x /sbin/restorecon ] && /sbin/restorecon `dirname $PIDFILE`
fi

start_uploadscript() {
Expand All @@ -82,7 +85,7 @@ case "$1" in
start)
test "$STANDALONE_OR_INETD" = standalone || exit 0
echo -n "Starting $DESC: "
--start $SSDAEMONLOGOPTS --pidfile "$PIDFILE" \
start-stop-daemon --start $SSDAEMONLOGOPTS --pidfile "$PIDFILE" \
--exec $WRAPPER -- $SUFFIX
start_uploadscript Starting
;;
Expand Down
1 change: 1 addition & 0 deletions etc/pure-ftpd/conf/AltLog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
clf:/var/log/pure-ftpd/transfer.log
1 change: 1 addition & 0 deletions etc/pure-ftpd/conf/FSCharset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UTF-8
1 change: 1 addition & 0 deletions etc/pure-ftpd/conf/MinUID
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1000
1 change: 1 addition & 0 deletions etc/pure-ftpd/conf/NoAnonymous
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yes
1 change: 1 addition & 0 deletions etc/pure-ftpd/conf/PAMAuthentication
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yes
1 change: 1 addition & 0 deletions etc/pure-ftpd/conf/PureDB
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/etc/pure-ftpd/pureftpd.pdb
1 change: 1 addition & 0 deletions etc/pure-ftpd/conf/TLSCipherSuite
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
HIGH
1 change: 1 addition & 0 deletions etc/pure-ftpd/conf/UnixAuthentication
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
no
60 changes: 60 additions & 0 deletions etc/pure-ftpd/pure-ftpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
ChrootEveryone yes
BrokenClientsCompatibility no
MaxClientsNumber 50
Daemonize yes
MaxClientsPerIP 8
VerboseLog no
DisplayDotFiles yes
AnonymousOnly no
NoAnonymous no
SyslogFacility ftp
DontResolve yes
MaxIdleTime 15

# MySQLConfigFile /etc/pureftpd-mysql.conf
# PureDB /etc/pureftpd.pdb
PureDB /etc/pure-ftpd/pureftpd.pdb

# ExtAuth /var/run/ftpd.sock

# PAMAuthentication yes
UnixAuthentication yes

LimitRecursion 10000 8
AnonymousCanCreateDirs no
MaxLoad 4

PassivePortRange 45000 45099
ForcePassiveIP 52.221.186.193

# AntiWarez yes

# Bind 127.0.0.1,21

Umask 133:022
MinUID 100
AllowUserFXP no
AllowAnonymousFXP no
ProhibitDotFilesWrite no
ProhibitDotFilesRead no
AutoRename no
AnonymousCantUpload no
# TrustedIP 10.1.1.1

# CreateHomeDir yes
# Quota 1000:10

# PIDFile /var/run/pure-ftpd.pid
PIDFile /var/run/pure-ftpd/pure-ftpd.pid

# CallUploadScript yes

MaxDiskUsage 90
CustomerProof yes

IPV4Only no

TLS 2
TLSCipherSuite HIGH:MEDIUM:+TLSv1:!SSLv2:!SSLv3
CertFile /etc/ssl/certs/ssl-cert-snakeoil.pem

10 changes: 10 additions & 0 deletions etc/pure-ftpd/pureftpd-dir-aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Configuration file for directory aliases
#
# To define alias/directory pairs, use alternating lines of alias
# and directory (optional blank lines are allowed) like that:
#
# pictures
# /usr/misc/pictures
#
# sources
# /usr/src
Loading

0 comments on commit 31c92a3

Please sign in to comment.