|
|
发表于 2006-2-27 21:55:53
|
显示全部楼层
Post by aleng
最新版本应该在本人的博客 aleng2006.blogcn.com
# This is a basic ProFTPD configuration file
# /etc/proftpd.conf
# made by 车里焖 2006-2-21 tested from proftpd1.2.10
# 为什么使用proftpd?因为各方面好,连世界级的开源网站http://sourceforge.net都用它!
# 我用它主要是因为用户管理,目录权限管理都在一个文件中,而不在系统中。简单 ,easy移植!
# 我的ftp服务器p4-256M只有ftp服务,带宽2M,使用动态域名,用于共享软件,电影等。
# 设置1个用户名ftpuser,1个组ftp,2个目录(/home/ftpuser ,/home/ftpuser/onlydown)
# 只允许ftpuser登录,
# /home/ftpuser允许上传,下载,覆盖,不允许删除。
# /home/ftpuser/onlydown允许下载,不许上传,不许删除。
# 服务器最多15个连接,每个ip最多使用3个连接,不限制上传下载速度。
#ServerName "Ftp Default Server" #设定FTP服务器的名称,非必要
DisplayLogin .inmsg #欢迎信息
DisplayQuit .outmsg
DeferWelcome off
UseReverseDNS off #DNS反查
IdentLookups off #
ServerType standalone #设置FTP以Standalone模式运行,而不是以dameon模式
DefaultServer on #默认FTP服务器工作
Port 21 #FTP服务默认占用的端口
Umask 007 #默认新文件权限
TimeoutIdle 120 #发呆超时
TimeoutLogin 120 #身份验证超时
RootLogin off #root不能进入
DefaultRoot /home/ftpuser ftp #ftp组用户将限制在 /home/ftpuser目录
#ServerIdent off #不显示ftp服务器版本信息,以增强安全性,必要性不大
User nobody #设置FTP服务以nobody运行
Group nobody
AllowOverwrite on #文件可以覆盖
AllowRetrieveRestart on #续传
AllowStoreRestart on
AllowForeignAddress on #使用 fxp
PassivePorts 60000 61000
MaxLoginAttempts 10 "服务器忙,请稍后再试!" #最大尝试连接次数
MaxClientsPerHost 3 "错误,每ip最多3次连接!" #每用(ip)户线程
MaxClients 15 "用户已满,请稍后再试!" #最大用户数
# MaxHostsPerUser=MaxClientsPerUser 1 "对不起,本帐号不能多人同时登录!"
MaxInstances 20 # 防止 dos攻击
SystemLog /var/log/proftpd.log #日志文件位置
TransferLog /var/log/ftp.log
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"
ListOptions "-a"
# 权限部分
<Limit LOGIN>
Allowuser ftpuser #如果想允许aaa用户,就在ftpuser后面加一个aaa,添加用户easy
</Limit>
<Directory ~>
<Limit DELE RMD>
DenyUser ftpuser
</Limit>
</Directory>
<Directory ~/onlydown>
<Limit WRITE STOR RMD DELE RNFR MKD> #如果想设置权限,如不能删除文件。
DenyUser ftpuser #就在这个目录拒绝ftp命令dele。
</Limit>
</Directory>
RequireValidShell off #保证匿名用户正常登录,不要更改
# 我没有开匿名用户
# <Anonymous "匿名登陆的目录">
# <Limit 限制动作>
# </Limit>
# </Anonymous>
# 我没有限制 ip
#设置只允许192.168.0的用户登录
#<limit LOGIN>
#Order allow,deny
#Allow from 192.168.0.
#Deny from all
#</limit>
用gproftpd配置更方便
你放到FTP上的中文文件名,用windows的机器连,能正常显示吗? |
|