centos7 install pure-ftpd

1, to obtain the installation package


2, install dependencies

yum -y install openssl openssl-devel gcc gcc-c++


3, compile and install pure-ftp

tar zxf pure-ftpd-1.0.47.tar.gz && cd pure-ftpd-1.0.47

./configure --prefix=/usr/local/pureftpd --without-inetd --with-altlog --with-puredb --with-throttling --with-peruserlimits --with-tls

echo $?

make && make install

echo $?


4, modify the configuration file

vim /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              10000 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


5, start

启动 pure-ftpd:

/usr/local/pureftpd/sbin/pure-ftpd  /usr/local/pureftpd/etc/pure-ftpd.conf


6, create a user

## to create a system user 
useradd PureFTP -s / sbin / nologin 


## create ftp users, pay attention to ftp user virtual user, will set the password
 / usr / local / pureftpd / bin / pure-pw useradd majin -u pureftp - d / usr / report this content share / nginx / HTML 

parameters:
     -u options: after associating with the system user virtual user majin pureftp together, that the use of ftp_wordpress account login fTP, will wordpress- identity ftp to read and download files;
     - d option: the back of the catalog for the majin account's home directory, so you can make only access their home directory / usr / report this content share / nginx / HTML 


## after creating the user, and then generate a pureftpd.passwd etc next file, the user is account information file 


## submitted to the database, generates pureftpd.pdb file in the etc
 / usr / local / pureftpd / bin / pure- pw mkdb 


## list of users:
 / usr / local / pureftpd / bin / pure- pw list 


# # delete account command:
 / usr / local / pureftpd / bin / Pure-pw userdel Majin


7, pure-ftp simple method of adding a user

1 , 
cd /...pureftpd/etc/ 
  vi pureftpd. Passwd 

direct line of ready-made user copy, change about user name, user name is the first column, 
 the back of the catalog can also be changed, that is, after the user logs can operate and where, then save; 


2 . switch to the /.../pureftpd/ bin run 
. / pure- pw database submitted mkdb # 


3 edit password. 
. / Pure-pw passwd user name 

enter the new password twice 
. / pure- pw mkdb # resubmitted database 

to get.

Guess you like

Origin www.cnblogs.com/weiyiming007/p/11496970.html