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.