I am creating a SFTP server with Chroot Jail. The problem is user cannot log into the home directory. I need to keep
ChrootDirectory value to one directory above the user's home directory (/home/jail/home in this case). I read that the directory needs to be owned by root. In that case user cannot do anything except logging into the server. Below is the sftp-specific part of my sshd_config file
Match User ftpuser ChrootDirectory /home/jail/home/ftpuser ForceCommand internal-sftp
$id ftpuser is
uid=1001(ftpuser) gid=1002(ftpuser) groups=1002(ftpuser),0(root)
I have intentionally added it to the root group so that ftpuser can at least login.
$grep ftpuser /etc/passwd is
Permissions of /home/jail/home/ftpuser ared
rwx------+ 3 root root 4096 2011-12-12 12:49 /home/jail/home/ftpuser/
What should I do?