|
贴一个我自己的配置文件, 供大家参考
注: <sp> = 空格
#
# Virtual Hosting Server Configuration
# for Frontier Internet Services Limited
#
# ServerName "NewSight.Net FTP Server"
#
# Spawn from inetd?
#
# ServerType inetd
#
# or maybe a standalone server...
#
ServerType standalone
#
# don't give the server banner until _after_ authentication
#
DeferWelcome on
#
# Some basic defaults
#
<Global>
DefaultRoot ~ !root
LoginPasswordPrompt on
AllowOverwrite on
RootLogin off
#不允许 root 登陆
DisplayGoAway /usr/local/etc/full.msg
DisplayLogin /usr/local/etc/welcome.msg
DisplayQuit /usr/local/etc/logout.msg
</Global>
#
MaxInstances 150
#
DefaultServer off
# 如果你又多个IP, 要做每个IP绑定到每个虚拟服务器, 一定要设off
# 否则, 虚拟绑定的并不会单独生效
#
ServerIdent off
Umask 002
ServerAdmin xxx@xxx
#用你自己的email
#
User nobody
Group nobody
#
# Performance, let's do DNS resolution when we process the logs...
#
UseReverseDNS off
#不做反向解析
#
TransferLog /var/spool/syslog/proftpd/xferlog.legacy
#
# 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"
#
# Turn off Ident lookups
#
IdentLookups off
#
<Limit LOGIN>
DenyAll
</Limit>
#不允许default server的登陆, 只能用虚拟服务器的设置
#
<VirtualHost 你自己的域名>
ServerName "VIP for C.C.C & N.S.N 100k/1"
TimeoutLogin 30
TimeoutIdle 60
TimeoutNoTransfer 60
TimeoutStalled 120
MaxLoginAttempts 50
MaxClientsPerHost 1 "Only Allow 1 Connect Per Computer"
MaxClients 50
RateReadBPS 102400
# 限速100k/s
DefaultRoot ~ !root
#除了root以为, 其他人不运行离开自己的根
AllowOverwrite yes
AllowStoreRestart on
#可以续传
Bind 1.2.3.4
#你要绑定的IP
Port 2011
#绑定端口
User nobody
Group nobody
AllowForeignAddress off
#不允许 FXP
RequireValidShell no
#用mysql一定要设no
SQLAuthTypes Plaintext
#密码加密形式
SQLAuthenticate users*
SQLConnectInfo xxx@2.3.4.5 username password
#这个的格式是: 数据库名@mysql主机地址<sp>mysql用户<sp>mysql密码<sp>联接mysql有效时间
#如果你的mysql服务器不是本机, 那就输入mysql主机的IP或者域名
#如是本机, 就用 数据库名@localhost ....
SQLDefaultGID 65534
SQLDefaultUID 65534
SQLMinUserGID 100
SQLMinUserUID 500
SQLUserInfo data username pwd NULL NULL homedir shell
#这里的格式: 数据表名<sp>用户字段<sp>密码字段<sp>UID字段(没设就NULL)<sp>GID字段(没设就NULL)<sp>用户的根目录字段<sp>登陆shell字段
<Directory /share>
<Limit DIRS READ>
AllowAll
</Limit>
#只允许 下载
<Limit LIST WRITE DELE CMD>
DenyAll
</Limit>
#不允许 list, 删除, 写等
</Directory>
</VirtualHost>
#以上是下载的
#下面是管理员的
<VirtualHost 你自己的域名>
ServerName "C.C.C & N.S.N Mod Port"
TimeoutLogin 30
TimeoutIdle 60
TimeoutNoTransfer 60
TimeoutStalled 120
MaxLoginAttempts 10
MaxClientsPerHost 10
#限每个IP只能10个联接
RequireValidShell no
MaxClients 30
RateReadBPS 30720
#限 30k/s
DefaultRoot ~ !root
AllowOverwrite yes
#可以 续传
AllowStoreRestart on
#可以 续载
Port 5918
Bind 4.5.6.7
#绑定到另外一个IP (因为我又2个IP地址, 所以把下载和管理分开)
User nobody
Group nobody
AllowForeignAddress on
#可以 FXP
<Limit LOGIN>
Order allow,deny
AllowUser admin
AllowUser mod
AllowUser upload
DenyAll
</Limit>
<Directory /share/incoming>
<Limit DIRS LIST WRITE>
AllowUser upload
</Limit>
#只允许 list, 写
</Directory>
<Directory /share>
<Limit DIRS LIST READ WRITE DELE CMD>
Order allow,deny
AllowUser mod
AllowUser admin
DenyAll
</Limit>
#可以 读, list, 写, 删除, 改文件属性
</Directory>
</VirtualHost> |
|