0

I'm using vsftpd, and I can't seem to get the behaviour I want through vsftpd.conf. What if you want /folder to be the change root folder to disallow users from going one folder up, but the starting directory for all sessions to be /folder/$USER??

#vsftpd.conf
user_sub_token=$USER
local_root=/folder
#user_config_dir=/etc/vsftpd/users
passwd_chroot_enable=YES
#hide everything
hide_file={.*}

If I use passwd_chroot_enable=YES then it overrides local_root=/folder and chroots the session to /folder/$USER (the home folder specified in /etc/passwd). Shouldn't chroot and the landing home folder for sessions be two disparate things? Why are they being schlepped together like that? I want users to land in their home folder, but be restricted only one folder back. That way the path within the ftp session will be /username instead of just /.

Here is an example of it working in sftpd (sshd_config):

Match Group mtlsftpprd001_edi-ftp
        ChrootDirectory /folder
        X11Forwarding no
        AllowTcpForwarding no
        ForceCommand internal-sftp -l INFO -d %u
        KerberosAuthentication yes

0 Answers0