[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problem with chroot paths



On (01/04/05 16:29), Javier Kohen wrote:
> El vie, 01-04-2005 a las 20:18 +0100, Clive Menzies escribió:
> 
> > # smbclient configuration
> > //server/share /smb/share    cifs credentials=/home/user/.smb_pass,file_mode=0660,dir_mode=0770  0  0
> > ditto for other shares.
> > 
> > df -h shows the shares within the chroot environment as well as on /smb
> 
> > I followed everything in the HOWTO and all is working fine except that
> > in spite of having identical entries in fstab for the smb shares, they
> > don't mount in the chroot. ie. I can't read/write from OOo and df -h
> > doesn't show the chroot mounts. In almost every respect the installs are
> > identical.
> 
> I don't know what the problem could be (maybe you can't mount twice the
> same share?), but you could have a bind or rbind mount to export
> the /smb tree to the chroot.
Thanks Javier

It is not mounting the same share twice, it is (in someway) binding the
mounts (which are already mounted in the /etc/fstab) to the chroot
environment.

On my original system, installed in January, I have nothing in the fstab
to specifically do this but it works. df -h shows details of all the
mounted shares in the chroot.

However, on the latest install, the shares mount but don't get bound to
the chroot.  

I thought, OK let's specificy the bindings in the /fstab.  So I put in a
line for each of the eight shares, to bind them to the chroot. First
reboot it worked.  I then thought let's just bind the /smb directory
which is the mount point for the samba shares.  This didn't work but
when I reverted to binding the individual shares something really weird
happened:
df -h gave all the lines of the chroot shares but all with the same 
size, use and available space data as for the /tmp bind.  Go figure ;)

So I created a script to bind all the mounts manually to the chroot and
everything was fine again.  I've just tried again to use fstab to bind
them automatically et voila, it is back to normal... very strange, it is
though the system, in some way remembered the unsuccessful bind with
/smb and chose the nearest entry in the fstab to bind to all the chroot
entries.

Anyway, I need to get on with some work, now I can write to the server
using OOo ;)  When I've more time I want to find out where the
difference in the two systems lies.

Regards

Clive



-- 
www.clivemenzies.co.uk ...
...strategies for business




Reply to: