Merge pull request #224 from heaven73/master
Pure-FTPd template for FreeBSD
This commit is contained in:
@@ -331,6 +331,31 @@ return array(
|
|||||||
'restart' => array(
|
'restart' => array(
|
||||||
'/usr/local/etc/rc.d/proftpd restart'
|
'/usr/local/etc/rc.d/proftpd restart'
|
||||||
)
|
)
|
||||||
|
),
|
||||||
|
'pure-ftpd' => array (
|
||||||
|
'label' => 'Pure-FTPd',
|
||||||
|
'commands_1' => array (
|
||||||
|
'cd /usr/ports/ftp/pure-ftpd',
|
||||||
|
'make config',
|
||||||
|
'# select LARGEFILE,MYSQL,PAM,PRIVSEP,SENDFILE,THROTTLING,TLS,UTF8,VIRTUALCHROOT',
|
||||||
|
'make install clean'
|
||||||
|
),
|
||||||
|
'commands_2' => array(
|
||||||
|
'touch /usr/local/etc/pure-ftpd.conf',
|
||||||
|
'touch /usr/local/etc/pureftpd-mysql.conf',
|
||||||
|
'chown root:0 /usr/local/etc/pure-ftpd.conf',
|
||||||
|
'chown root:0 /usr/local/etc/pureftpd-mysql.conf',
|
||||||
|
'chmod 0600 /usr/local/etc/pure-ftpd.conf',
|
||||||
|
'chmod 0600 /usr/local/etc/pureftpd-mysql.conf',
|
||||||
|
'echo "pure-ftpd_enable="YES" >> /etc/rc.conf'
|
||||||
|
),
|
||||||
|
'files' => array(
|
||||||
|
'usr_local_etc_pure-ftpd.conf' => '/usr/local/etc/pure-ftpd.conf',
|
||||||
|
'usr_local_etc_pureftpd-mysql.conf' => '/usr/local/etc/pureftpd-mysql.conf'
|
||||||
|
),
|
||||||
|
'restart' => array(
|
||||||
|
'service pure-ftpd restart'
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
############################################################
|
||||||
|
# Configuration file for pure-ftpd wrappers #
|
||||||
|
############################################################
|
||||||
|
BrokenClientsCompatibility no
|
||||||
|
MaxClientsNumber 30
|
||||||
|
Daemonize yes
|
||||||
|
MaxClientsPerIP 8
|
||||||
|
VerboseLog no
|
||||||
|
DisplayDotFiles yes
|
||||||
|
AnonymousOnly no
|
||||||
|
NoAnonymous yes
|
||||||
|
SyslogFacility ftp
|
||||||
|
DontResolve yes
|
||||||
|
MaxIdleTime 10
|
||||||
|
MySQLConfigFile /usr/local/etc/pureftpd-mysql.conf
|
||||||
|
UnixAuthentication yes
|
||||||
|
LimitRecursion 10000 8
|
||||||
|
AnonymousCanCreateDirs no
|
||||||
|
MaxLoad 4
|
||||||
|
# Port range for passive connections replies. - for firewalling.
|
||||||
|
# PassivePortRange 30000 50000
|
||||||
|
# Force an IP address in PASV/EPSV/SPSV replies. - for NAT.
|
||||||
|
# Symbolic host names are also accepted for gateways with dynamic IP addresses.
|
||||||
|
# ForcePassiveIP 192.168.0.1
|
||||||
|
AntiWarez yes
|
||||||
|
# IP address/port to listen to (default=all IP and port 21).
|
||||||
|
# Bind 127.0.0.1,21
|
||||||
|
# Maximum bandwidth for *all* users (including anonymous) in KB/s
|
||||||
|
# Use AnonymousBandwidth *or* UserBandwidth, both makes no sense.
|
||||||
|
UserBandwidth 512
|
||||||
|
# File creation mask. <umask for files>:<umask for dirs> - 177:077 if you feel paranoid.
|
||||||
|
Umask 133:022
|
||||||
|
# Minimum UID for an authenticated user to log in.
|
||||||
|
MinUID 100
|
||||||
|
# Allow FXP transfers for authenticated users.
|
||||||
|
AllowUserFXP no
|
||||||
|
# Allow anonymous FXP for anonymous and non-anonymous users.
|
||||||
|
AllowAnonymousFXP no
|
||||||
|
ProhibitDotFilesWrite no
|
||||||
|
ProhibitDotFilesRead no
|
||||||
|
AutoRename no
|
||||||
|
AnonymousCantUpload yes
|
||||||
|
# Disallow the CHMOD command. Users can't change perms of their files.
|
||||||
|
#NoChmod yes
|
||||||
|
# Allow users to resume and upload files, but *NOT* to delete them.
|
||||||
|
#KeepAllFiles yes
|
||||||
|
MaxDiskUsage 90
|
||||||
|
CustomerProof yes
|
||||||
|
# This option can accept three values :
|
||||||
|
# 0 : disable SSL/TLS encryption layer (default).
|
||||||
|
# 1 : accept both traditional and encrypted sessions.
|
||||||
|
# 2 : refuse connections that don't use SSL/TLS security mechanisms,
|
||||||
|
# including anonymous sessions.
|
||||||
|
# Do _not_ uncomment this blindly. Be sure that :
|
||||||
|
# 1) Your server has been compiled with SSL/TLS support (--with-tls),
|
||||||
|
# 2) A valid certificate is in place,
|
||||||
|
# 3) Only compatible clients will log in.
|
||||||
|
# TLS 1
|
||||||
|
# List of ciphers that will be accepted for SSL/TLS connections
|
||||||
|
# Prefix with -S: in order to totally disable SSL but not TLS.
|
||||||
|
# TLSCipherSuite HIGH:MEDIUM:+TLSv1:!SSLv2:+SSLv3
|
||||||
|
# IPV4Only yes
|
||||||
|
# IPV6Only yes
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
##############################################
|
||||||
|
# Pure-FTPd Mysql configuration file. #
|
||||||
|
# for use with Froxlor Panel #
|
||||||
|
##############################################
|
||||||
|
# Optional : MySQL server name or IP. Don't define this for unix sockets.
|
||||||
|
# MYSQLServer <SQL_HOST>
|
||||||
|
# Optional : MySQL port. Don't define this if a local unix socket is used.
|
||||||
|
# MYSQLPort 3306
|
||||||
|
# Optional : define the location of mysql.sock if the server runs on this host.
|
||||||
|
MYSQLSocket /tmp/mysql.sock
|
||||||
|
MYSQLUser <SQL_UNPRIVILEGED_USER>
|
||||||
|
MYSQLPassword <SQL_UNPRIVILEGED_PASSWORD>
|
||||||
|
MYSQLDatabase <SQL_DB>
|
||||||
|
MYSQLCrypt crypt
|
||||||
|
# \L is replaced by the login of the user trying to authenticate.
|
||||||
|
# \I IP address connect to # \P port number the user connected to.
|
||||||
|
# \R is replaced by the IP address the user connected from. # \D is replaced by the remote IP address, as a long decimal number.
|
||||||
|
MYSQLGetPW SELECT password FROM ftp_users WHERE username='\L' AND login_enabled="y"
|
||||||
|
MYSQLGetUID SELECT uid FROM ftp_users WHERE username='\L' AND login_enabled="y"
|
||||||
|
MYSQLGetGID SELECT gid FROM ftp_users WHERE username='\L' AND login_enabled="y"
|
||||||
|
MYSQLGetDir SELECT homedir FROM ftp_users WHERE username='\L' AND login_enabled="y"
|
||||||
|
#MySQLGetQTAFS SELECT QuotaFiles FROM ftp_users WHERE User='\L'
|
||||||
|
MySQLGetQTASZ SELECT panel_customers.diskspace/1024 AS QuotaSize FROM panel_customers, ftp_users WHERE username='\L' AND panel_customers.loginname = SUBSTRING_INDEX('\L','ftp', 1)
|
||||||
|
# Optional : ratios. The server has to be compiled with ratio support.
|
||||||
|
# MySQLGetRatioUL SELECT ULRatio FROM users WHERE User='\L'
|
||||||
|
# MySQLGetRatioDL SELECT DLRatio FROM users WHERE User='\L'
|
||||||
|
# Optional : bandwidth throttling. The server has to be compiled with throttling support. Values are in KB/s .
|
||||||
|
# MySQLGetBandwidthUL SELECT ULBandwidth FROM users WHERE User='\L'
|
||||||
|
# MySQLGetBandwidthDL SELECT DLBandwidth FROM users WHERE User='\L'
|
||||||
|
|
||||||
Reference in New Issue
Block a user