Assigning Limited access to users for a particular folder: using vsftpd
- Install vsftpd if not installed (http://www.thegeekstuff.com/2010/11/vsftpd-setup/)
- Create user with home folder to the folder which you want him to have access or modify their folder (You can use useradd or usermod command)
- You can see users in /etc/passwd file
- Add this code to the vsftpd’s config file (/etc/vsftpd.conf)
orsa_cert_file=/etc/ssl/private/vsftpd.pem
pasv_enable=YES
pasv_min_port=1024
pasv_max_port=1048
pasv_address=107.21.238.10
anonymous_enable=NO
local_root=/mnt/filedump [Note: this is the path for the folder you which you want to give access to]
- Remove comment from “chroot_local_user=YES” on in vsftpd’s config.
- Make sure the folder has appropriate writes on it, else you can change that using chmod command for example chmod -R 777 Folder path
- Restart VSFTPD services [service vsftpd restart]
- Now you can give hostname, userID and password to user and just relax (he won’t be able to access any other directory)
All your comments are welcome.
That is a really good tip especially to those fresh to the blogosphere. Brief but very accurate info… Thanks for sharing this one. A must read post!
Greetings! Very useful advice within this article! It’s the little changes which will make the biggest changes. Thanks a lot for sharing!