I have a folder /srv/jarvis which has punch of subfolder and on of them is called carl (/srv/jarvis/carl)
jarvis Dir has these rights
drwxrwxrwx 12 root root 4096 Jun 9 11:34 jarvis
And Carl has these rights
drwxr-xr-x 4 carl carl 4096 Jun 9 13:02 carl
In the /etc/ssh/sshd_config i have added these lines
Match user carl
ChrootDirectory /srv/jarvis/carl
ForceCommand internal-sftp
AllowTCPForwarding no
X11Forwarding no
But if i add those lines and do service ssh restart
then the user cant login into that server Write fails: Broken pipe. And if remove tose lines from sshd_config he can login again but i dont want that
I want that the use can access only to /srv/jarvis/carl/ and do there what ever he wants Also he cant do any of the root stuff :)
How can i fix thoes problems