The following is the step-by-step to install pure-FTP on Linux CentOS server:
Download pure-ftp installation file:
ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/ .
Extract the installation file at any directory.
e.g. pure-ftpd-xxx/
Configuring & Installing:
# ./configure -with-everything -with-paranoidmsg -without-capabilities -with-virtualchroot
# make
# make install
After done.
# cd pure-ftpd-xxx/configuration-file/
You need to copy the configuration file to the system:
# cp pure-ftpd.conf /etc/
Then copy the startup script:
# cp pure-config.pl /usr/local/sbin/
To make a group for FTP service:
# groupadd ftpgroup
To check the created groups:
# less /etc/group
To set up the master “FTP User” and assign it into group:
useradd -g ftpgroup -d /home/ftpusers -s /etc ftpuser
To check the added users:
# less /etc/passwd
To create a ftp user and assign it to a directory:
# pure-pw useradd {myftp} -u ftpuser -d /home/{myftp}
* useradd : option for Adding user in pure-pw
* {myftp} : ftp username
* -u : linux username
* ftpuser : the linux user that created
* -d : destination path to the upload directory
* /home/directoryname : path name
Enter ftp user password twice.
e.g.mypass
To display a specify ftp user information:
# pure-pw show {myftp}
Ftp user detail is stored in /etc/pureftpd.passwd
Generate ftp database:
# pure-pw mkdb
It is created at /etc/pureftpd.pdb
Edit the FTP configuration:
vi /etc/pure-ftpd.conf
Uncomment “PureDB” & “AltLog”(clf log).
Finally to start up the ftp service:
# /usr/local/sbin/pure-config.pl /etc/pure-ftpd.conf
If you get the permisssion denied error, do this:
# chmod 755 /usr/local/sbin/pure-config.pl
# yum install perl
Else you should able to see the message below:
Done !!! Pureftp is installed. May try to connect to the ftp service via ftp client or ftp command.
To test it, you might also need to flush the firewall:
iptables -F
And try connecting to the FTP server:
# ftp {server-ip}
Tags:
FTP server,
install ftp,
linux,
pureftp