I have the following settings, and I restart the sshd service every time I make a change.
Match Group sftp_users
ChrootDirectory /home/sftp-data
ForceCommand internal-sftp
But when I log into the server, it goes to the server's root directory. If I remove the Match Group
line, it works as expected changing the root to /home/sftp-data and logging the user straight to its home dir.
The group name is correct. I've also tried using Match User
with the user name, and no luck.
/home/
and /home/sftp-data
are owned by root. in /home/sftp-data
I have a directory m
that is owned by my sftp user. The sftp user's home directory is specified as /m
.
"OpenSSH_8.2p1, OpenSSL 1.1.1g FIPS 21 Apr 2020"
What could be wrong?
UPDATE:
This is the user info
$ id sftp_user
uid=1002(sftp_user) gid=1002(sftp_users) groups=1002(sftp_users)
0 Answers