One: Xshell using XFTP to transfer files
Download XFTP5, then login to the host, press CTRL+ALT+F, you can open the FTP window directly
Second: Using PURE-FTPD to build FTP service
Installing PURE-FTPD
(1) Download software
PURE-FTPD Official website is HTTP://WWW.PUREFTPD.ORG/PROJECT/PURE-FTPD
#cd/usr/local/src/
#wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.42.tar.bz2
(2) Installation pure-ftpd
#tar JXF pure-ftpd-1.0.42.tar.bz2
#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
(3) Configuration pure-ftpd
PURE-FTPD compile and install is done quickly, and there are few errors, it should be configured below:
#cd Configuration-file
#mkdir-P/usr/local/pureftpd/etc/
#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
Before you start pure-ftpd, you need to modify the configuration file to
/usr/local/pureftpd/etc/pure-ftpd.conf, you can open a look, there is a lot of content, if the English good, you can
Do a good research, here is the configuration file I provided, if you feel the direct change is too troublesome, directly to the configuration of the delete
In addition, then paste the following configuration (config file http://study.lishiming.net/.pf.c)
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 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
(4) Start pure-ftpd
#cd/usr/local/pureftpd/
#./sbin/pure-config.pl./etc/pure-ftpd.conf
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
(5) Create an account
The account used by PURE-FTPD is not a Linux system account, but a virtual account. Because it's safer to do so.
#mkdir/data/www/
#useradd www
#chown-R www:www/data/www/
#/usr/local/pureftpd/bin/pure-pw Useradd ftp_user1-uwww-d/data/www/
Password:
Enter It again:
Where-u associates the virtual user Ftp_user1 with the system user www, that is to say, using ftp_user1
Once the account is logged in to FTP, it will read the file or download it as www. -D behind the directory is Ftp_user1 account
Home directory so that Ftp_user1 can only access its home directory/data/www/. It's not done yet.
The key step is to create a user information database file:
#/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 ftp_user2-uwww-d/tmp
#/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 Ftp_user2
(6) Test pure-ftpd
The tool to be used for testing is called LFTP, which is installed first:
#yum install-y lftp
Test:
#touch/data/www/123.txt
#lftp [email protected]
Password:
lftp [email protected]:~> ls
Drwxr-xr-x 2 514 www 4096 June 12 11:14.
Drwxr-xr-x 2 514 www 4096 June 12 11:14..
-rw-r--r--1 514 www 0 June 11:14 123.txt
After logging in, use the LS command to list what files are in the current directory. I use the LFTP tool to facilitate
Test it in a Linux system. The best way to test this is to install an FTP client software on your Windows machine (push
filezilla-client) and then go to the remote connection test.
Here I'll provide a way to install PURE-FTPD using Yum, listing only the commands and not explaining them in detail.
Yum Install-y Epel-release expect
Yum Install-y pure-ftpd
Curl HTTP://WWW.APELEARN.COM/STUDY_V2/.PF.C >/etc/pure-ftpd/pure-ftpd.conf
User=mkpasswd -l 5 -s 0 -d 0 -C 0
pass=mkpasswd -s 0
echo $user $pass >/tmp/ftp.pass
Mkdir-p/data/ftp #创建 Directory of FTP services
Echo-e "$pass \n$pass" |PURE-PW useradd $user-u apache-d/data/ftp/
PURE-PW MKDB #创建密码文件
PURE-PW List #列出用户
PURE-PW Userdel $user #删除账号
/ETC/INIT.D/PURE-FTPD Start #启动服务
Xshell using XFTP to transfer files, using PURE-FTPD to build FTP services