29 oct 2008

Levantar VSFTPD en CentOS

Verificar si tenemos instalado el servicio
[root@lab ~]# rpm -q vsftpd
vsftpd-2.0.1-5.EL4.5

Revisar archivos de vsftpd
[root@lab ~]# rpm -qc vsftpd
/etc/logrotate.d/vsftpd.log
/etc/pam.d/vsftpd
/etc/vsftpd.ftpusers
/etc/vsftpd.user_list
/etc/vsftpd/vsftpd.conf

Analizar el estado del servicio
[root@lab ~]# service vsftpd status
vsftpd is stopped (el servicio esta detenido)

Iniciar el servicio
[root@lab ~]# service vsftpd start
Starting vsftpd for vsftpd: [ OK ]

Nos conectamos con el usuario anonymous
[root@lab ~]# ftp 127.0.0.1
Connected to 127.0.0.1.
220 (vsFTPd 2.0.1)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (127.0.0.1:root): anonymous
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

Verificar si el servicio se levanta al reiniciar la maquina
[root@lab ~]# chkconfig --list |grep vsftpd
vsftpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
(no se levanta al reiniciar)

Para que el servicio se inicie al prender el equipo
[root@lab ~]# chkconfig --level 35 vsftpd on
[root@lab ~]# chkconfig --list |grep vsftpd
vsftpd 0:off 1:off 2:off 3:on 4:off 5:on 6:off

La ruta del ftp es:
[root@lab pub]# cd /var/ftp/pub/
si creamos un archivo en esta ubicacion quedaria visible en ftp

Otra manera de reiniciar el servicio
[root@lab /]# /etc/rc.d/init.d/vsftpd restart
Shutting down vsftpd: [ OK ]
Starting vsftpd for vsftpd: [ OK ]
[root@lab /]#

Ver Lista de los comandos en FTP
ftp> help

Ver ayuda de un comando en especifico
ftp> help get
get receive file

Habilitar para poder iniciar como usuario root
ir a las siguientes rutas
/etc/vsftpd.ftpusers
/etc/vsftpd.user_list
y comentar el root
#root


Acceder al ftp desde windows
Desde Ejecutar cmd
luego ftp 10.20.24.254

o tambien
ftp
o 10.20.24.254

1 comentario:

Rodolfo Burlando Makthon dijo...

Pregunta.

Como puedo configurar para que determinados usuarios tengan acceso de lectura/escritura y otros de solo lectura?.

Gracias.

Rodolfo Burlando