Hello,
I am trying to setup vsftp on CentOS.
My test user can connect via sftp and is chroot'd to the proper directory. However she can browse /, /etc, more... and has access to bash.
I want to limit the user to her own directory and no access to bash.
This is the current /etc/passwd
#
ftpuser:x:503:503::/home/ftpuser/ftp:/bin/bash
#
I have tried changing the /bin/bash for /bin/false, /sbin/nologin and /dev/null. This disallows any possible login to bash and ftp.
This is the /etc/vsftpd/vsftpd.conf
#
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
ftpd_banner=Hello.
pam_service_name=vsftpd
userlist_enable=YES
listen=YES
tcp_wrappers=YES
chroot_local_user=YES
#
I have also tried the combination
#
[...]
chroot_local_user=NO
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
#
while adding my user to /etc/vsftpd.chroot_list.
Any suggestion? I'm a beginner, please be explicit.
Thanks
FnL
I am trying to setup vsftp on CentOS.
My test user can connect via sftp and is chroot'd to the proper directory. However she can browse /, /etc, more... and has access to bash.
I want to limit the user to her own directory and no access to bash.
This is the current /etc/passwd
#
ftpuser:x:503:503::/home/ftpuser/ftp:/bin/bash
#
I have tried changing the /bin/bash for /bin/false, /sbin/nologin and /dev/null. This disallows any possible login to bash and ftp.
This is the /etc/vsftpd/vsftpd.conf
#
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
ftpd_banner=Hello.
pam_service_name=vsftpd
userlist_enable=YES
listen=YES
tcp_wrappers=YES
chroot_local_user=YES
#
I have also tried the combination
#
[...]
chroot_local_user=NO
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
#
while adding my user to /etc/vsftpd.chroot_list.
Any suggestion? I'm a beginner, please be explicit.
Thanks
FnL