So using vsftpd I want to lock a user to /home/theirname/Minecraft
. I can't change their home directory because a program I'm using(McMyAdmin) will try to reinstall itself but I don't want them having access to the programs configs.
1 Answer
This tutorial would seem to be what you're looking for, titled: Setup Virtual Users and Directories in VSFTPD.
excerpt
In /etc/vsftpd.conf
.
listen=YES
anonymous_enable=NO
local_enable=YES
virtual_use_local_privs=YES
write_enable=YES
connect_from_port_20=YES
secure_chroot_dir=/var/run/vsftpd
pam_service_name=vsftpd
guest_enable=YES
user_sub_token=$USER
local_root=/var/www/sites/$USER
chroot_local_user=YES
hide_ids=YES
You'll likely need to customize this slightly based on what your needs are. You'll want to change the local_root
line for starters:
local_root=/home/$USER/Minecraft