pureftp默认支持匿名用户的,但是默认的匿名用户要登录必须满足一下两个条件:
1.确保有ftp用户
grep ftp /etc/passwd
2.确保有ftp用户主目录
usermod -d /data ftp
默认支持匿名用户上传,匿名用户上传是根据用户主目录权限来控制的
chown ftp:ftp /data/upload
匿名用户可调参数:
# Don’t allow authenticated users – have a public anonymous FTP only.
#是否只让匿名登录
AnonymousOnly no
# Disallow anonymous connections. Only allow authenticated users.
#不允许匿名连接,仅允许认证用户使用
NoAnonymous no
# Are anonymous users allowed to create new directories ?
#允许匿名用户创建新目录
AnonymousCanCreateDirs no
# If the system is more loaded than the following value,
# anonymous users aren’t allowed to download.
#如果系统被loaded超过下面的值,匿名用户会被禁止下载
MaxLoad 4
# Upload/download ratio for anonymous users.
#匿名用户的上传/下载的比率
# AnonymousRatio 1 10
# Maximum bandwidth for anonymous users in KB/s
#匿名用户的最大带宽(KB/s)
# AnonymousBandwidth 8
# Disallow anonymous users to upload new files (no = upload is allowed)
#不接受匿名用户上传新文件(no=允许上传)
AnonymousCantUpload no
# This option is useful with servers where anonymous upload is
# allowed. As /var/ftp is in /var, it save some space and protect
# the log files. When the partition is more that X percent full,
# new uploads are disallowed.
#最大磁盘利用率
MaxDiskUsage 99
# Disallow downloading of files owned by “ftp”, ie.
# files that were uploaded but not validated by a local admin.
# 是否允许下载匿名用户上传的文件?NO 为允许下载。否则会出现这个
#文件没有被管理员核准下载的提示。
AntiWarez yes
参考资料:
http://www.crazylemon.net/ftp/96.html
http://tech.ddvip.com/2008-10/122310831173588.html