Re: Allowing access to symbolically linked directory
Brought to you by:
xystrus
From: Clayton D. <cd...@gm...> - 2007-09-12 13:02:36
|
I just named my first child Tim (Thanks!) On 9/12/07, Tim Cutts <tj...@sa...> wrote: > > > 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. > -- ______________________________________________________________ C I S C O S Y S T E M S Clayton Dukes Network Management Consulting Engineer Advanced Services - Central Engineering Phone :+1 919.392.6122 Mobile :+1 813-545-7373 Fax :+1 919-869-1580 7025-3 Kitt Creek Road RTP, NC 27709-4987 ______________________________________________________________ |