Ftp=file Transter Protocol File Transfer Protocol
FTP common software has PURE-FTPD and vsftpd (System comes with)
The PURE-FTPD is more flexible than the vsftp configuration.
Official website Www.pureftpd.ort
1. Download the source package
wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.42.tar.bz2
2. Unzip the source package
Tar jxvf pure-ftpd-1.0.42.tar.bz2
3. Compiling and installing the source code
CD pure-ftpd-1.0.42
./configure \
--PREFIX=/USR/LOCAL/PUREFTPD \
--WITHOUT-INETD \
--with-altlog \
--with-puredb \
--with-throttling \
--with-peruserlimits \
--with-tls
Make && make install
4.PURE-FTPD compile and install is done quickly, and there are few errors, it should be configured below:
Mkdir-p/usr/local/pureftpd/etc/# Create profile directory
CD configuration-file # Enter profile template directory
CP pure-ftpd.conf/usr/local/pureftpd/etc/pure-ftpd.conf # Copy the configuration template to the configuration file directory
CP pure-config.pl/usr/local/pureftpd/sbin/pure-config.pl # copy startup script to sbin directory
chmod 755/usr/local/pureftpd/sbin/pure-config.pl # Modify startup script executable permissions
5. Modify the configuration file, the template is comments and explanations, a lot of content, remove the explanation of the template:
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 3136 8
Anonymouscancreatedirs No
Maxload 4
Antiwarez Yes
Umask 133:022
Minuid #映射用户UID最小为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-config.pl/usr/local/pureftpd/etc/pure-ftpd.conf
The front is the startup program, followed by the configuration file
If it is successful, it displays a long line of information that starts with Running, or it is an error message. Heavy
It might be a bit cumbersome, after all, we don't have a startup script. Restart, you can use the following command to implement.
Killall PUREF-FTPD
cd/usr/local/pureftpd/;/sbin/pure-config.pl./etc/pure-ftpd.conf
6. Create a Test Catalog
Mkdir/tmp/ftp
chown-r wyp:wyp/tmp/ftp # prepare to map the virtual user to the system user Wyp, so have permissions.
7. Create User account password
/usr/local/pureftpd/bin/pure-pw useradd user1-uwyp-d/tmp/ftp/ Enter
Enter Password two times
-U associates the virtual user User1 with the system user Wyp, that is, using the User1 account to log in to FTP, will be WYP to read the file or download the file. The directory behind the-D is the FTP test directory, which allows User1 to access only the directory/tmp/ftp/.
8. The final step is to create a user information database file. (Key Step)
/USR/LOCAL/PUREFTPD/BIN/PURE-PW MKDB
PURE-PW can also list the current FTP account, of course, you can delete an account, we create an account:
/USR/LOCAL/PUREFTPD/BIN/PURE-PW Useradd user2-uwyp-d/tmp/ftp
/USR/LOCAL/PUREFTPD/BIN/PURE-PW MKDB
List Current Account:
/USR/LOCAL/PUREFTPD/BIN/PURE-PW List
The command to delete the account is:
/USR/LOCAL/PUREFTPD/BIN/PURE-PW Userdel User2
After-School troubleshooting
1./pureftpd/etc/pureftpd.pdb This file is my virtual user account password file, I can not use cat and vim to view the specific contents of the file, what command to view?
A: No, it is a binary file.
[Email protected] ~]#/USR/LOCAL/PUREFTPD/BIN/PURE-PW MKDB
This is mainly what to do with the household Information database files, but do not think it is used in where? A password or something? Solve, Baidu did not search for useful answers ~
A: MKDB is actually the user name password we previously set to log into a file, this file is pure-ftpd recognized files.
1.3-PUREFTP Deployment and optimization-1