一键安装包lnmp1.4.tar.gz中的pureftpd安装脚本
安装参考文档:
http://blog.51cto.com/865516915/2064503
http://www.ttlsa.com/system/install-pureftpd/
http://www.zxdown.com/hanhua/1662.html
http://www.zxdown.com/hanhua/1662.html
cp /usr/local/pureftpd/etc/pure-ftpd.conf /usr/local/pureftpd/etc/pure-ftpd.conf.bak
egrep -v "^#|^$" /usr/local/pureftpd/etc/pure-ftpd.conf.bak >/usr/local/pureftpd/etc/pure-ftpd.conf
[root@git-server pureftpd]# cd /usr/local/pureftpd/
[root@git-server pureftpd]# cd etc/
[root@git-server etc]# ls
pure-ftpd.conf pure-ftpd.conf.bak pureftpd.passwd pureftpd.pdb
[root@git-server etc]# /etc/init.d/pureftpd restart
Restarting Pure-FTPd...
Stopping Pure-FTPd... done
Starting Pure-FTPd... done
[root@git-server etc]# netstat -lntup|grep pure-ftpd
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 25749/pure-ftpd
Bind 0.0.0.0,1038
添加参数Bind 0.0.0.0,1038
[root@git-server etc]# cat pure-ftpd.conf
ChrootEveryone yes
BrokenClientsCompatibility no
MaxClientsNumber 50
Daemonize yes
MaxClientsPerIP 2
VerboseLog no
DisplayDotFiles yes
AnonymousOnly no
NoAnonymous yes
SyslogFacility ftp
DontResolve yes
MaxIdleTime 15
PureDB /usr/local/pureftpd/etc/pureftpd.pdb
LimitRecursion 10000 8
AnonymousCanCreateDirs no
MaxLoad 4
PassivePortRange 20000 30000
AntiWarez yes
Umask 133:022
MinUID 100
AllowUserFXP no
AllowAnonymousFXP no
ProhibitDotFilesWrite no
ProhibitDotFilesRead no
AutoRename no
AnonymousCantUpload yes
PIDFile /var/run/pure-ftpd.pid
MaxDiskUsage 99
CustomerProof yes
UserBandwidth 80
Bind 0.0.0.0,1038
[root@git-server test03]# pure-pw useradd jiantest01 -u www -d /data/www/test01
Password: zykj@test01
Enter it again: zykj@test01
chown -R www.www /data/www/test01
[root@git-server test03]# pure-pw useradd jiantest02 -u www -d /data/www/test02
Password: zykj@test02
Enter it again: zykj@test02
chown -R www.www /data/www/test02
[root@git-server test03]#
[root@git-server test03]# pure-pw useradd jiantest03 -u www -d /data/www/test03
Password: zykj@test03
Enter it again: zykj@test03
chown -R www.www /data/www/test03
注意:
新添加完用户以及改完密码,以及授权管理目录时,必须修得要执行以下命令才可以生效[root@git-server etc]# /usr/local/pureftpd/bin/pure-pw mkdb
查看用户列表:
[root@git-server etc]# /usr/local/pureftpd/bin/pure-pw list
jiantest01 /data/www/test01/./
jiantest02 /data/www/test02/./
jiantest03 /data/www/test03/./
查看密码文件:
[root@git-server etc]# cat /usr/local/pureftpd/etc/pureftpd.passwd
jiantest01:$6$5mDEpGv5S695qpk0$vVd9hoGBRTia3s3j1zughrG59Sq31k7c1lYdWaE27teqr6IT.ylZiHE61OeqB8R94yHPQDiYW8aKUCwB5NN1K0:501:501::/data/www/test01/./::::::::::::
jiantest02:$6$b2lVvgMFQI7Mps00$KQFYuoZKt3yR9zmDByR3vMN6G8A9Vac6ovdXr.ps903J/YfdAknaN1TfkqUmIfA6vuoOh4dICx/JfbvawOhgp1:501:501::/data/www/test02/./::::::::::::
jiantest03:$6$VbYXJjUEMGJMwcw0$Yn3HKwRtW6qAt4Saki/xFfiarC3kixYoFGZnTjXizNPOW59uscUergqf.u0Gvy0/jLcylZWAAwphrKj/FLgma0:501:501::/data/www/test03/./::::::::::::
[root@git-server etc]#
如果添加完用户以后想要删除可以使用/usr/local/pureftpd/bin/pure-pw userdel jiantest01这条指令
[root@git-server etc]# /usr/local/pureftpd/bin/pure-pw userdel jiantest01
[root@git-server etc]# /usr/local/pureftpd/bin/pure-pw list
jiantest02 /data/www/test01/./
jiantest03 /data/www/test03/./
想要修改密码可以使用/usr/local/pureftpd/bin/pure-pw passwd jiantest02这条指令
[root@git-server etc]# /usr/local/pureftpd/bin/pure-pw passwd jiantest02
Password: zykj123456
Enter it again: zykj123456
修改完密码记得要执行以下命令才可以生效
[root@git-server etc]# /usr/local/pureftpd/bin/pure-pw mkdb
原文:http://blog.51cto.com/wujianwei/2095857