1

I have been batling with vsftpd for days now. I started with trying to setup seceure vsftpd on my current Centos 5.6 server but could not lock users down to their home directories. I spent days trying all the suggestions I could find with chroot_local_user etc...with no luck. I then read a post that said that some of the directives were not implemented on Centos 5. I then downloaded Centos 7 and setup a new ftp server with vsftpd and tried all the suggestions again. Still no luck.

What then struck me is that even though I have userlist_enable=YES and have the standard ftpusers and user_list files with user root in I can still connect with user root to the ftp server. Nothing i change in vsftpd.conf seems to affect vsftpd.

Does anybody know what i am missing? I will appreciate any help.

my current config file:

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

chroot_local_user=YES

allow_writeable_chroot=YES

chroot_list_enable=YES

chroot_list_file=/etc/vsftpd/chroot_list

listen=YES

pam_service_name=vsftpd

userlist_enable=YES

tcp_wrappers=YES

ssl_enable=YES

allow_anon_ssl=NO

ssl_tlsv1=YES

ssl_sslv2=YES

ssl_sslv3=YES

rsa_cert_file=/etc/vsftpd/vsftpd.pem
1

Perhaps just a paste gone wrong from you, but if you are unable to change anything in two different distros, I'm starting to think you're editing the config file in Windows Notepad and messing up the line-breaks.

If that's the case, stop doing that and edit the file in some decent text editor which allows you to setup Unix line breaks, or even more preferably edit the config files at the server with nano/vim/emacs/some other text editor.

  • Thanks for the response. I am using vi however on the server to edit the config file. As far as i can see the standard installation of vsftpd with its original config files should not even allow root to login? I cant even get vsftp to deny root never mind chroot the users.... – user249398 Oct 16 '14 at 11:47
  • oh, sorry, i see what you mean about the "paste" issue. and yes it is a paste issue. – user249398 Oct 16 '14 at 11:51
  • i have changed the copy of my config file to only show what is not commented – user249398 Oct 16 '14 at 11:58
  • ... and I assume vsftpd is the one you can install with yum install vsftpd, not compiled from the source? – Janne Pikkarainen Oct 16 '14 at 12:01
  • Yes installed with yum. I have copied the example config file back now and it still allows root to login – user249398 Oct 16 '14 at 12:44
-1

Please dont swear at me but my problem was that I was using sftp to connect to the server and the built-in ssh ftp module was accepting my connection NOT vsftpd which is listening on port 21 and i am connecting on port 22 !!!!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.