Score:0

chroot vs home_folder in vsftpd

yt flag

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
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.