- 论坛徽章:
- 0
|
数据库确认已经启动!附配置文件
ServerName "ProFTPD Default Installation"
ServerType standalone
ServerAdmin myunix@hotmail.com
DefaultServer on
Port 21
Umask 022
#
MaxInstances 30
#
MaxLoginAttempts 5
#
User nobody
Group nobody
#
#
# User ftp
# Group ftp
#
AllowOverwrite on
#
MaxClients 100
#
DisplayLogin welcome.msg
DisplayFirstChdir .message
#
DisplayConnect /usr/local/proftpd/etc/connect.msg
DisplayGoAway /usr/local/proftpd/etc/goway.msg
#
DisplayQuit /usr/local/proftpd/etc/quit.msg
MaxHostsPerUser 1
MaxClientsPerUser 2
MaxClientsPerHost 1
RootLogin off
RequireValidShell off
UseReverseDNS off
IdentLookups off
TimeoutStalled 600
TimeoutLogin 900
TimeoutIdle 600
TimeoutNoTransfer 600
AllowForeignAddress on
PassivePorts 49152 65534
AllowStoreRestart on
AllowRetrieveRestart on
ServerIdent off
DefaultRoot ~ ftpgroup
#-------- load sql.mod for mysql authoritative --------#
SQLAuthTypes Backend Plaintext
SQLAuthenticate users* groups*
SQLConnectInfo ftpdb@localhost root
#
SQLUserInfo ftpuser userid passwd uid gid homedir shell
SQLGroupInfo ftpgroup groupname gid members
#
SQLHomedirOnDemand on
SQLNegativeCache on
# Update count every time user logs in
SQLLogFile /var/log/proftpd.sql.log
SQLNamedQuery getcount SELECT "count from ftpuser where userid='%u'"
SQLNamedQuery getlastlogin SELECT "lastlogin from ftpuser where userid='%u'"
SQLNamedQuery updatelogininfo UPDATE "count=count+1,host='%h',lastlogin=current_timestamp() WHERE userid='%u'" ftpuser
SQLShowInfo PASS "230" "You've logged on %{getcount} times, last login at %{getlastlogin}"
SQLLog PASS updatelogininfo
#-------- load sql.mod for mysql authoritative --------#
#-------- load qudes.mod for Quota limit --------#
#
QuotaEngine on
#
QuotaDirectoryTally on
#
QuotaDisplayUnits Mb
#
QuotaShowQuotas on
#
QuotaLog "/var/log/proftpd.quota.log"
#
SQLNamedQuery get-quota-limit SELECT "name, quota_type, per_session, limit_type, bytes_in_avail, \
bytes_out_avail, bytes_xfer_avail, files_in_avail, files_out_avail, files_xfer_avail FROM ftpquotalimits \
WHERE name = '%{0}' AND quota_type = '%{1}'"
SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used, bytes_out_used, \
bytes_xfer_used, files_in_used, files_out_used, files_xfer_used FROM ftpquotatallies \
WHERE name = '%{0}' AND quota_type = '%{1}'"
SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, \
bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, \
files_in_used = files_in_used + %{3}, files_out_used = files_out_used + %{4}, \
files_xfer_used = files_xfer_used + %{5} \
WHERE name = '%{6}' AND quota_type = '%{7}'" ftpquotatallies
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}" ftpquotatallies
QuotaLimitTable sql:/get-quota-limit
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally
#--------- load qudes.mod for Quota limit --------#
# Logging options
# Debug Level
# emerg, alert, crit (empfohlen), error, warn. notice, info, debug
#
SyslogLevel emerg
SystemLog /var/log/proftpd.system.log
TransferLog /var/log/proftpd.xferlog
# Some logging formats
#
LogFormat default "%h %l %u %t "%r" %s %b"
LogFormat auth "%v [%P] %h %t "%r" %s"
LogFormat write "%h %l %u %t "%r" %s %b"
# Log file/dir access
# ExtendedLog /var/log/proftpd.access_log WRITE,READ write
# Record all logins
ExtendedLog /var/log/proftpd.auth_log AUTH auth
# Paranoia logging level....
ExtendedLog /var/log/proftpd.paranoid_log ALL default |
|