Subject: Bind Mount into VServer fails due to permission problems
From: Thomas Gebhardt <gebhardt@hrz.uni-marburg.de>
Date: Thu, 05 Nov 2009 13:45:45 +0100

Hi,

I have a NFS mounted partition on the host system that I want to
propagate to the VServer(s) on that host by a bind mount in
/etc/vservers/<vname>/fstab :
/fs/home (on the host) ->  /home (Vserver)

This works perfectly well with debian sarge (util-vserver 0.30.214-6)
but fails in debian lenny (util-vserver 0.30.216~r2772) due to a
permission problem:

++ /usr/lib/util-vserver/secure-mount -a --chroot --fstab
/etc/vservers/<vname>/fstab --rootfs no
secure-mount: chdir("/home"): Permission denied
/etc/vservers/<vname>/fstab:4:1: failed to mount fstab-entry

Indeed root cannot chdir to /fs/home, since it is NFS-exported
with the root_squash option (and non-priviledged users aren't
allowed to chdir to /home).

How can I get around this problem without changing the permissions
on the NFS server?

Thanks for any hint! Th. Gebhardt