Score:0

SFTP - Match Group ignore in sshd_config

ru flag

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)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.