pure-ftpd 的编译安装及配置文件
下载最新的pure-ftp源码包pure-ftpd-1.0.20.tar.bz2
# wget http://syslab.comsenz.com/downlo ... ftpd-1.0.21.tar.bz2
#tar jxvf pure-ftpd-1.0.21.tar.bz2
#cd pure-ftpd-1.0.21
./configure \
"--prefix=/usr/local/pureftpd" \
"--without-inetd" \
"--with-altlog" \
"--with-puredb" \
"--with-throttling" \
"--with-largefile" \
"--with-peruserlimits" \
"--with-tls" \
"--with-language=simplified-chinese"
#make && make install
起动
法一:用参数
/usr/local/pureftpd/sbin/pure-ftpd -S 21 -c 20 -C 1 -E -u 100 -R -t:800 -a 0 &
-S 端口
-c 最大用户数
-C 线程数
-E Anonymous logins are prohibited
-u Don't allow uids below <uid> to log in
-R Disallow users (even non-anonymous ones) usage of the CHMOD command
-t:800 下载800k,上传无限制
-a 0 除gid 0的组,限制用户再主目录。
法二:用配置文件
#mkdir /usr/local/pureftpd/etc
#cd configuration-file
#cp pure-ftpd.conf /usr/local/pureftpd/etc/pure-ftpd.conf
#cp pure-config.pl /usr/local/pureftpd/sbin/pure-config.pl
#chmod 755 /usr/local/pureftpd/sbin/pure-config.pl
启动命令: /usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf
当然要修改配置文件,英文说明也不是很难。
下面是我的配置文件:
____________________________________
ChrootEveryone yes
BrokenClientsCompatibility no
MaxClientsNumber 50
Daemonize yes
MaxClientsPerIP 8
VerboseLog no
DisplayDotFiles yes
AnonymousOnly no
NoAnonymous no
SyslogFacility ftp
DontResolve yes
MaxIdleTime 15
PureDB /usr/local/pureftpd/etc/pureftpd.pdb
LimitRecursion 2000 8
AnonymousCanCreateDirs no
MaxLoad 4
AntiWarez yes
Umask 133:022
MinUID 100
AllowUserFXP no
AllowAnonymousFXP no
ProhibitDotFilesWrite no
ProhibitDotFilesRead no
AutoRename no
AnonymousCantUpload no
PIDFile /usr/local/pureftpd/var/run/pure-ftpd.pid
MaxDiskUsage 99
CustomerProof yes
#######接下来该建立用户了###############
# /usr/local/pureftpd/bin/pure-pw useradd ftp_test -u www -d /data/wwwroot其中,-u 将虚拟用户 ftp_test 与系统用户 www 关联在一起。-d 参数使 ftp_test 只能访问其主目录。执行完上述命令后,会提示输入密码。
# /usr/local/pureftpd/bin/pure-pw mkdb
# wget http://syslab.comsenz.com/downlo ... ftpd-1.0.21.tar.bz2
#tar jxvf pure-ftpd-1.0.21.tar.bz2
#cd pure-ftpd-1.0.21
./configure \
"--prefix=/usr/local/pureftpd" \
"--without-inetd" \
"--with-altlog" \
"--with-puredb" \
"--with-throttling" \
"--with-largefile" \
"--with-peruserlimits" \
"--with-tls" \
"--with-language=simplified-chinese"
#make && make install
起动
法一:用参数
/usr/local/pureftpd/sbin/pure-ftpd -S 21 -c 20 -C 1 -E -u 100 -R -t:800 -a 0 &
-S 端口
-c 最大用户数
-C 线程数
-E Anonymous logins are prohibited
-u Don't allow uids below <uid> to log in
-R Disallow users (even non-anonymous ones) usage of the CHMOD command
-t:800 下载800k,上传无限制
-a 0 除gid 0的组,限制用户再主目录。
法二:用配置文件
#mkdir /usr/local/pureftpd/etc
#cd configuration-file
#cp pure-ftpd.conf /usr/local/pureftpd/etc/pure-ftpd.conf
#cp pure-config.pl /usr/local/pureftpd/sbin/pure-config.pl
#chmod 755 /usr/local/pureftpd/sbin/pure-config.pl
启动命令: /usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf
当然要修改配置文件,英文说明也不是很难。
下面是我的配置文件:
____________________________________
ChrootEveryone yes
BrokenClientsCompatibility no
MaxClientsNumber 50
Daemonize yes
MaxClientsPerIP 8
VerboseLog no
DisplayDotFiles yes
AnonymousOnly no
NoAnonymous no
SyslogFacility ftp
DontResolve yes
MaxIdleTime 15
PureDB /usr/local/pureftpd/etc/pureftpd.pdb
LimitRecursion 2000 8
AnonymousCanCreateDirs no
MaxLoad 4
AntiWarez yes
Umask 133:022
MinUID 100
AllowUserFXP no
AllowAnonymousFXP no
ProhibitDotFilesWrite no
ProhibitDotFilesRead no
AutoRename no
AnonymousCantUpload no
PIDFile /usr/local/pureftpd/var/run/pure-ftpd.pid
MaxDiskUsage 99
CustomerProof yes
#######接下来该建立用户了###############
# /usr/local/pureftpd/bin/pure-pw useradd ftp_test -u www -d /data/wwwroot其中,-u 将虚拟用户 ftp_test 与系统用户 www 关联在一起。-d 参数使 ftp_test 只能访问其主目录。执行完上述命令后,会提示输入密码。
# /usr/local/pureftpd/bin/pure-pw mkdb
none