HOWTO: Correct Permissions of a Covered Mount Point Without Remounting
There is a very old bug in Solaris (now fixed in Nevada) in which the underlying permissions of a mount point affect the overlying mounted filesystem. The normal way to resolve this is to umount the filesystem, correct the permission and remount it.
This is sometime easier said than done, for example, what if one of those filesystems is actually still in use, or even a critical OS filesystem like /var or /etc/mnttab. You don't really want to be umounting these whilst they're in use and the fix may involve booting from network or CD into single user mode.
Well, there is an easier and relatively unknown method of correcting this...
- Create a temporary directory in which we'll be performing our permissions correcting:
# mkdir -m 755 /fixmnt
- Loopback mount the root filesystem onto your new directory using the lesser known "nosub" option:
# mount -F lofs -o nosub / /fixmnt
- Correct the permissions of your problem underlying directory, eg /etc/mnttab:
# chmod 444 /fixmnt/etc/mnttab
- Umount the temporary loopback mount and remove the temporary directory:
# umount /fixmnt
# rmdir /fixmnt
The permissions on your mount point should now be correct and your desired behaviour should return, all without losing access to the filesystem and without a reboot.