Instalar PureFTPd

De Wiki de BandaAncha.eu
Saltar a: navegación, buscar

Objetivos

  • Servidores vituales en diferentes IPs
  • Mensajes en castellano

Proceso

wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.21.tar.gz
tar -zxvf pure-ftpd-1.0.21.tar.gz
cd pure-ftpd-1.0.21
./configure \
	--prefix=/usr/local/pureftpd \
	--with-language=spanish \
	--with-puredb \
	--with-quotas \
	--with-virtualhosts
make
make install-strip

Configuración

PureFTPd se configura mendiante los parametros que se le pasan al ejecutable. Por ejemplo:

/usr/local/pureftpd/sbin/pure-ftpd -ABEHR -l mysql:/usr/local/etc/pureftpd-mysql.conf -O clf:/var/log/pureftpd.log

-A Chroot() everyone, but root.
-B Start the standalone server in background (daemonize). 
-E Only allow authenticated login. Anonymous users are prohibited. 
-H Don't resolve host names 
-l Enable a new authentication method
-O clf:/var/log/pureftpd.log 
-R Disallow users (even non-anonymous ones) usage of the CHMOD command

Arranque y parada

Podemos hacer que arranque bajo petición con xinetd o que corra el demonio permanentemente esperando conexiones.

xinetd

vi /etc/xinetd.d/pure-ftpd

y añadimos

service ftp 
{ 
	socket_type = stream 
	server = /usr/local/pureftpd/sbin/pure-ftpd
	server_args = -AEHR
	protocol = tcp 
	user = root 
	wait = no
	disable = no 
}

Reiniciamos xinetd para que recoja la nueva configuración

killall -USR2 xinetd

Inicio y parada automático

cp contrib/redhat.init /etc/init.d/pureftpd
chmod +x /etc/init.d/pureftpd
chkconfig --add pureftpd

Tendremos que modificar la ruta al ejecutable

vi /etc/init.d/pureftpd

Enlaces