I created a chrooted user on a directory /home/jail
, Inside my /home/jail are the bin,dev,etc,home,lib,lib64 and usr
directories. /home/jail/ {bin,dev,etc,home,lib,lib64,usr} are all owned by root:root
I set my user's home directory to /home/jail/home/user
as shown on my /etc/passwd
and on my sshd_config
i have these entries:
Match Group jail
ChrootDirectory /home/jail
Of course user is under the jail group
The chrooted user can login but the bin,dev,etc,home,lib,lib64,usr
directories can be seen by the user, is this normal for chrooted environment?
If i change the ChrootDirectory
to /home/jail/home
the shell closes right after putting my password without any trace of error on /var/log/auth.log
By the way, i use putty and the server is running debian wheezy.