Linux shell to restrict sftp users to their home directories?

Posted by hfidgen on Stack Overflow See other posts from Stack Overflow or by hfidgen
Published on 2009-10-06T17:16:44Z Indexed on 2010/05/01 10:17 UTC
Read the original article Hit count: 214

Filed under:
|
|

I need to give SFTP access to a directory within my webroot on my server. I've set up ben_files as a user and have set his/her home directory to

/var/www/vhosts/mydomain.com/files

That's all fine if he/she connects with plain old FTP - he's/she's restricted just to that directory, but to enable SFTP I had to add him/her to bin/bash shell, which suddenly opens up my entire server...

Is there a way of giving him/her SFTP access but without opening up all my directories? I'd really like him restricted to only his/her home ;)

© Stack Overflow or respective owner

Related posts about linux

Related posts about shell