0

In CentOS, how can i specify user1 to directory /var/www/html and user2 to directory /home/user2, and as default user3 and all others to there home directory?

My config file has following /etc/vsftpd/vsftpd.conf:

# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
#chroot_list_enable=YES
chroot_local_user=YES
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list
  • This allow all users to there home directory only, but i need to specify user1 to another directory for full web directory access, and user2 only to his home directory (for personal ftp upload/download)
1

You should use virtualuser setup; Look here there is mine example of what to do. look at local_root=/var/ftpserver/ or at pam.d and change it for mysql. there you should be able to costumize directory and so on.

1

You may get access to WEB folder inside user's standard location - by mounting local folders using

mount --bind

It then works with vsftpd chrooted accounts. Don't forget to add entries into fstab

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.