Pure-FTP configuration Linux
Posted: August 23, 2011 Filed under: General Admin, IT Survival, Linux 1 Comment »Pure-FTP is a very good FTP server and is easy to install and set-up. There is a little trick to use to get it working but it will ensure that any users that are logged into the FTP session stay in their home folder.
Download pure-ftp from here
You need the GCC and make packages to install this
yum install GCC
yum install make
Once downloaded un-tar the file as per normal
tar -xf xxxxx.tar
There is an install file that explains how to install the server, but the basics are
./congure
./make
./make install
This will install the server. The clever bit is how to start the server. You do this by creating a file in the /etc/init.d directory and a start stop file
cd /usr/local/sbin
vi pure-ftp-start
Insert the following line
/usr/local/sbin/pure-ftpd -A -H -E -p 40000:50000 -c 20 -C 3 -I 5 -u 1 &
Save the file and then make the file executable
chmod 755 pure-ftp-start
vi pure-ftp-stop
Insert the following line
pkill pure-ftpd
Save the file and then make the file executable
chmod 755 pure-ftp-stop
cd /etc/init.d
vi pureftpd
Insert the following lines – the basis of this has been copied from another startup. Really need to look at some of the stuff at the top, but it works.
#!/bin/sh
# chkconfig: 235 99 10
# description: Start or stop the Webmin server
#
### BEGIN INIT INFO
# Provides: pure-ftp
# Required-Start: $network $syslog
# Required-Stop: $network
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: Start or stop the pure-ftp server
### END INIT INFO
start=/usr/local/sbin/pure-ftp-start
stop=/usr/local/sbin/pure-ftp-stop
name=’pure-ftp’
case “$1″ in
‘start’)
$start >/dev/null 2>&1 </dev/null
;;
‘stop’)
$stop
;;
‘restart’)
$stop ; $start
;;
*)
echo “Usage: $0 { start | stop }”
;;
esac
exit
Save the file and then make the file executable
chmod 755 pureftpd
To start the service manually
service pureftpd start
To stop the service manually
service pureftpd stop
To make the pure-ftp serever auto start then issue the following command
chkconfig –levels 345 pureftpd on

[...] pure-ftp start stop [...]