Create the goups and users used by ProFTPD by running:
groupadd -g 65534 nogroup
groupadd -g 4 ftp
useradd -u 65535 -g nogroup -d /home nobody
useradd -u 4 -g ftp -s /bin/sh -m ftp
Unpack the ProFTPD archive and install it by running:
./configure
make
make install
Create a new file /etc/init.d/proftpd containing:
#!/bin/sh
# Begin /etc/init.d/proftpd
check_status()
{
if [ $? = 0 ]
then
echo "OK"
else
echo "FAILED"
fi
}
case "$1" in
start)
echo -n "Starting Pro FTP daemon..."
start-stop-daemon -S -q -o -x /usr/sbin/proftpd
check_status
;;
stop)
echo -n "Stopping Pro FTP daemon..."
start-stop-daemon -K -q -o -x /usr/sbin/proftpd
check_status
;;
restart)
echo -n "Stopping Pro FTP daemon..."
start-stop-daemon -K -q -o -x /usr/sbin/proftpd
check_status
sleep 1
echo -n "Starting Pro FTP daemon..."
start-stop-daemon -S -q -o -x /usr/sbin/proftpd
check_status
;;
*)
echo "Usage: $0 {start|stop|restart}"
;;
esac
# End /etc/init.d/proftpd
Set the proper permissions by running:
chmod 755 /etc/init.d/proftpd
Create the proper symlinks by running:
cd /etc/rc2.d
ln -s ../proftpd S30proftpd
cd ../rc0.d
ln -s ../proftpd S30proftpd
cd ../rc6.d
ln -s ../proftpd S30proftpd