On 11 Sep 2007, at 11:02 pm, Clayton Dukes wrote:

> This is probably a dumb question since it defeats the purpose of a  
> chroot jail but...
>
> I've got rssh set up and working fine for sftp but is there a way  
> to give the user access to a directory mounted on another disk?
>

If you're using Linux, you can use a bind mount to mount a directory  
that's outside the chroot to an additional place inside the chroot.   
This trick is commonly used by Debian developers for building  
packages for different releases of Debian; for example I usually have  
two chroots for Debian development, one that contains an install of  
the stable branch, and one that contains an install of the testing  
branch.  I then bind-mount my home directory into each chroot, so  
that when I enter each chroot, I can still see my home directory.

For example:

mount --bind /home /path/to/chroot/home

You can make this automatic by putting it in the /etc/fstab

/home  /path/to/chroot/home none bind 0 0

I imagine this has various security implications, especially if you  
bind mount a directory which contains code which could be executed by  
the host operating system, but it's up to you to make that safe, and  
decide whether the security risk is acceptable.

Regards,

Tim


-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
rssh-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rssh-discuss

Reply via email to