Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to set up sftp access on my server and chroot the users into a samba share. When I edit /etc/ssh/sshd_config and add

Match Group sftpusers
 ChrootDirectory /srv/samba/share
 ForceCommand internal-sftp

I am no longer able to log in. When I try to ssh into the server I get Write failed: Broken pipe and my sftp client says the username and password are not accepted by the server

If I comment out those lines I am able to log in via ssh and sftp again.

/srv/samba/ is rwxr-xr-x root root

/srv/samba/share is rwxrwxr-x root sftpusers

Anyone know what I can do to solve this?

share|improve this question

1 Answer 1

ChrootDirectory /srv/samba/share should have been ChrootDirectory /srv/samba

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.