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 think my question is really: How do I follow the ChrootDirectory directions here to allow interactive shell?

I have a virtual server at Linode running Ubuntu 10.04. I will be hosting a Drupal site for a friend. I'd like to give him the ability to safely use wget and tar within his directory. That's all he needs to be able to easily install themes and modules.

I've set ChrootDirectory in sshd_config. I can connect with WinSCP and it appears to be working nicely. His home directory looks like a root which I'm unable to move above. WinSCP conveniently allows Linux commands from its menu but any attempt to execute a command results in "Current SFTP-3 does not support the command you request". I guess this is because I'm really asking it to allow interactive shell. Those commands work fine without ChrootDirectory being set.

I'm no Linux expert and I haven't really found any good instructions on how to add "typically sh(1), and basic /dev nodes such as null(4), zero(4), stdin(4), stdout(4), stderr(4), arandom(4) and tty(4) devices." to the ChrootDirectory.

Thanks for any helper or pointers

share|improve this question

1 Answer 1

up vote 1 down vote accepted

MAKEDEV is usually used to create device files easily. Passing it -d will allow you to specify a directory to create them in.

MAKEDEV -d /srv/ssh/chroot/dev mem null port ...

For sh just use cp -a, and ldd to see what libraries it may need.

share|improve this answer
    
Thanks, I'll give it a go. –  tetranz Oct 12 '10 at 21:34

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.