|
|
我的系统 Rhel AS U3, Proftpd 版本 1.2.10
内网,同一网段
现象:
客户端为CuteFTP 6.0, 当连接出现"Socket 已连接。正在等候欢迎消息..."后要等近10秒才显示连接成功,要求用户名和密码.
Proftpd 配置:
# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.
ServerName "XXXX FTP SERVER"
ServerType standalone
DefaultServer on
ServerIdent off
#MaxLoginAttempts 3
#MaxClientsPerUser 2
#MaxClientsPerHost 1
SystemLog /var/log/proftpd.log
AllowStoreRestart on
AllowForeignAddress on
DisplayLogin welcome.msg
#不允许 .ftpaccess 和 .htaccess 上传
PathDenyFilter "(\\.ftpaccess)|(\\.htacess)$"
# Port 21 is the standard FTP port.
Port 21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022
# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances 30
# Set the user and group under which the server will run.
User nobody
Group nobody
# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~
# Normally, we want files to be overwriteable.
AllowOverwrite on
# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
DenyAll
</Limit>
<Anonymous /ftp/incomming>
User ftpup
Group ftpuser
#只允许上传用户使用别名登录
AuthAliasOnly on
AuthUsingAlias on
#AnonRequirePassword on
#设置上传用户别名及上传用户密码
UserAlias upload ftpup
UserPassword upload $1$GHN8vLoX$jpEkxoFdAOrCd/p492lPs1
<Limit RNFR DELE RMD RETR> #不允许更改目录名、删除文件及目录、下载文件
DenyAll
</Limit>
</Anonymous>
<Anonymous /ftp>
User ftpdown
Group ftpuser
#只允许下载用户使用别名登录
AuthAliasOnly on
AuthUsingAlias on
#AnonRequirePassword on
#设置下载用户别名及上传用户密码
UserAlias download ftpdown
UserPassword download $1$eAkUOljf$HnfZbW3MPrtF3Ccn5501y.
<Directory /ftp/manage>
<Limit ALL>
DenyAll
</Limit>
</Directory>
<Directory /ftp/lost+found>
<Limit ALL>
DenyAll
</Limit>
</Directory>
</Anonymous>
# A basic anonymous configuration, no upload directories. If you do not
# want anonymous users, simply delete this entire <Anonymous> section.
<Anonymous ~ftp>
User ftp
Group ftp
# We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp
# Limit the maximum number of anonymous logins
MaxClients 10
# We want 'welcome.msg' displayed at login, and '.message' displayed
# in each newly chdired directory.
DisplayLogin welcome.msg
DisplayFirstChdir .message
# Limit WRITE everywhere in the anonymous chroot
<Limit WRITE>
DenyAll
</Limit>
</Anonymous> |
|