I'm trying to create the user lenny, that has read and write permissions in the folder
/home/lenny/ and has no shell but only access via SFTP. I'm doing the following:
useradd lenny mkdir /home/lenny usermod -d /home/lenny lenny passwd lenny chown lenny:lenny /home/lenny chmod 755 /home/lenny usermod -s /bin/false myuser
I then modified
Subsystem sftp internal-sftp` Match User lenny ChrootDirectory /home/lenny ForceCommand internal-sftp
Now when I do
sftp lenny@server I can leave the CHROOT easily by doing
cd / and
ls -la, I see everything!
Why is that??? I don't get it, configuration should be okay, or am I wrong?