I’ve very basic knowledge of Linux. Please help me configure vsftpd.
How configure MyCloud’s vsftpd for different users home dirs ?
MyCloud have 3 users:
and have next shares:
By default ftp users after login can see all shares, but have access only to Public and own share.
How for user beta set ftp home dir as /beta ?
What I must write in vsftpd config file? (or may be, I must do some configuration in passw file?)
Warning, changes might void your warranty:-
Edit the conf:
chroot_local_user=YES <- should already been set, just make sure it is.
local_root=/nfs/$USER <- existing but append /$USER.
user_sub_token=$USER <- add.
Restart the daemon:
service vsftpd restart;
Now when user beta logs in, the user will only see his stuffs not the rest of the dir structures.
But here’s the problem, e.g. for user beta, the home path /nfs/beta/ needs to be read-only i.e.
chmod u-w /nfs/beta/; else you’ll get FTP error “500 OOPS: vsftpd: refusing to run with writable root inside chroot()” when trying to login. But if you set this path to read-only, then the user won’t be able to write in the root path which could cause issues with Samba shares. The only way is to pre-create the writable folders i.e. /nfs/beta/writable_folders/. The option “allow_writeable_chroot=YES” doesn’t work for the pre-installed version of vsftpd in MyCloud.
Depending on your needs, this might or might not work out for you.
Thank you so much.
You helped me a lot.
Now all users login to their home dirs.