Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have multiple folders in /var/www for different websites -- Apache uses name-based Virtual Hosts (Ubuntu Server). Suppose I want to allow someone to access their /var/www/user directory, but not cd out of it and be able to traverse the system.

I found information about an OpenSSH Jail here: http://antitese.org/sshjail/

Has anyone used/implemented something like this? Is there a better way aside from basic permissions to control this?

share|improve this question
    
possible duplicate of How can I chroot ssh connections? –  mailq Sep 17 '11 at 23:27
add comment

1 Answer

up vote 4 down vote accepted

I recently implemented it for a client. The concern was that many sensitive files are readable by anyone with SSH access, so I followed the instructions on Limiting Access with SFTP Jails on Debian and Ubuntu at Linode and it has worked fine since.

I did have to fiddle around with permissions quite a bit -- permissions have to be set exactly as described. Also, I found error messages (I think in /var/log/auth.log) to be surprisingly helpful.

share|improve this answer
    
Thanks for the info! –  Trent Scott Sep 19 '11 at 1:49
add comment

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.