pureftpd安装使用文档

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了pureftpd安装使用文档相关的知识,希望对你有一定的参考价值。

1.环境

一键安装包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

2.配置和使用

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
[[email protected] pureftpd]# cd /usr/local/pureftpd/
[[email protected] pureftpd]# cd etc/
[[email protected] etc]# ls
pure-ftpd.conf   pure-ftpd.conf.bak  pureftpd.passwd  pureftpd.pdb

[[email protected] etc]# /etc/init.d/pureftpd restart
Restarting Pure-FTPd...
Stopping Pure-FTPd...   done
Starting Pure-FTPd...  done
[[email protected] 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

3.修改ftp的端口为1038

添加参数Bind 0.0.0.0,1038

[[email protected] 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

4.添加ftp虚拟用户,前提是系统用户www,必须是存在的

[[email protected] test03]# pure-pw useradd jiantest01 -u www -d /data/www/test01
Password: [email protected]
Enter it again: [email protected]
chown -R www.www /data/www/test01
[[email protected] test03]# pure-pw useradd jiantest02 -u www -d /data/www/test02
Password: [email protected]
Enter it again: [email protected]
chown -R www.www /data/www/test02
[[email protected] test03]# 
[[email protected] test03]# pure-pw useradd jiantest03 -u www -d /data/www/test03
Password: [email protected]
Enter it again: [email protected]
chown -R www.www /data/www/test03

注意:
新添加完用户以及改完密码,以及授权管理目录时,必须修得要执行以下命令才可以生效
[[email protected] etc]# /usr/local/pureftpd/bin/pure-pw mkdb

查看用户列表:

[[email protected] etc]#  /usr/local/pureftpd/bin/pure-pw list
jiantest01          /data/www/test01/./                                        
jiantest02          /data/www/test02/./                                        
jiantest03          /data/www/test03/./ 

查看密码文件:

[[email protected] 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/./::::::::::::
[[email protected] etc]# 

如果添加完用户以后想要删除可以使用/usr/local/pureftpd/bin/pure-pw userdel jiantest01这条指令

[[email protected] etc]# /usr/local/pureftpd/bin/pure-pw userdel jiantest01
[[email protected] etc]# /usr/local/pureftpd/bin/pure-pw list
jiantest02          /data/www/test01/./                                        
jiantest03          /data/www/test03/./  

想要修改密码可以使用/usr/local/pureftpd/bin/pure-pw passwd jiantest02这条指令

[[email protected] etc]# /usr/local/pureftpd/bin/pure-pw passwd jiantest02
Password: zykj123456
Enter it again: zykj123456

修改完密码记得要执行以下命令才可以生效

[[email protected] etc]# /usr/local/pureftpd/bin/pure-pw mkdb

以上是关于pureftpd安装使用文档的主要内容,如果未能解决你的问题,请参考以下文章

LNMP 下安装 Pureftpd 开启FTP服务以及修改FTP端口

LNMP下安装Pureftpd开启FTP服务以及修改FTP端口的方法

ftp--pureftpd1.0.46

vsftp or pureftpd

使用 Python 代码片段编写 LaTeX 文档

Lnmp下pureftpd新建FTP账户权限不足解决方法