Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)
share|improve this question

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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