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.
Search
Related Entries
- Chmod Without Execute Permissions
- Links for 3 August 2007
- HOWTO: Update Ultra 20 BIOS From a USB Stick
- HOWTO: Change Wordpress Table Prefix
- ZFS is Now Officially Available
- NFSv4 On Linux is Broken
- HOWTO: Fix “ORA-27102: out of memory” Error on Solaris 10
- HOWTO: Multi-boot Solaris, RHEL, SLES and Nevada
- HOWTO: Migrate a UFS Root Filesystem to ZFS
- HOWTO: Create a ZFS Filesystem OS X Leopard



Doesn’t work in Solaris 9.
Ah, good point Mike. Yes, this doesn’t work on Solaris 9 and earlier. If you need to do this on an earlier release of Solaris, check out Chris Gerhard’s details here.