Hello. I have created a user to access from the Windows 11 command line, using SFTP, only a specific folder.
The “home directory” is: /home/db_repository/docs
with permissions 755.
The “Shell” is: /bin/false.
The message I receive when trying to connect is directly “Connection closed”
If I change the shell to /bin/bash, the user accesses the root folder and sees all the folders, although he cannot navigate.
I try to connect by doing “sftp docs@162.19.89.212” or “sftp -P 22 docs@162.19.89.212”.
With the root user I do access well. Can you help me? Thanks in advance.
You do not need to use chroot jails if you only want the user to have FTP access (including the ssh protocol). You just need to use the right port (2222) to talk to the FTP server.