Hi,
so I was following this
guide, which I found in this
forum topic.
And I've come across an issue I can't fix.
Here's what I want to do:
- I have a user with a home directory. Let's call the user "boss_user" and so his home directory is /home/boss_user.
- Within that home directory there are three other directories.
- Then I create three new users: "dummy_user1" "dummy_user2" and "dummy_user3".
- These three users home directories are supposed to be the three directories in the home directory of "boss_user".
- When "dummy_user1" connects via sFTP I want him to be jailed into his home directory (which is within the home directory of "boss_user").
So what I did was:
Code:
adduser dummy_user1
usermod -d /home/boss_user/dir1 -m dummy_user1
Put this into the sshd_config:
Code:
Match user dummy_user1
ChrootDirectory /home/boss_user/dir1
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
And following that I executed:
Code:
chmod 755 /home/boss_user/dir1
Then I restarted SSH, with:
Code:
service ssh restart
What I get when trying to connect with my "dummy_user1" with FileZilla is:
Code:
Error: Network error: Software caused connection abort
Error: Could not connect to server
How do I fix this issue? I haven't been using linux for too long, so I might have made some stupid mistakes. Just can't figure out what I'm doing wrong here.
Greetz,
- Mercury
Edit: If I remove that part:
Code:
[code]Match user dummy_user1
ChrootDirectory /home/boss_user/dir1
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp[/code]
The user can connect, but (of course, as expected) is not jailed to his home directory.