Mountpoint permission problem in Solaris
The following condition was originally discovered in OpenSolaris 11 (Bug ID: 4697677). This problem occurs when you do mkdir -m 700 on a mountpoint before mounting it. This superceeds whatever permissions you might give to the mountpoint after it’s mounted.
This condition has been known to occur following a Live Upgrade process from Solaris 8 to Solaris 9. Apparently something in the Live Upgrade script sets restrictive permissions on the mountpoint before mounting it. Naturally, the Live Upgrade process is done under root account, so the SysAdmin would never notice the problem.
The symptoms of this issue include problems with the man command for non-root users, which uses nroff, which writes to temporary space in /usr/tmp which is a soft link to ../var/tmp. Also, in the affected filesystem (like /usr) a non-root user can do ls -als and will see something like this:
2 drwxr-xr-x 47 root sys 1024 May 4 12:36 . 2 drwxr-xr-x 2 root bin 1024 Feb 10 09:36 4lib 2 lrwxrwxrwx 1 root other 5 Feb 10 09:23 5bin -> ./bin 2 lrwxrwxrwx 1 root root 10 Feb 10 01:03 adm -> ../var/adm
As you may notice, the “..” metalink is missing. Also, you will not be able to access any soft links leading to ../whatever. This may be a big problem for some users and applications.
The easy way of fixing this is, of course, to unmount the filesystem and change the permissions for the underlying mountpoint. However, there is a way of addressing this issue without unmounting anything. The following is a script that would fix the problem using a local NFS mount. It uses /usr/ and /opt as examples.
#!/bin/ksh cd / mkdir /fix mkidr -p /fix/mnt for i in usr opt do chmod 700 /fix share -F nfs -o rw=localhost,root=localhost / mount -o vers=3 127.0.0.1:/ /fix/mnt chmod 755 /fix/mnt/${i} umount /fix/mnt unshare / done
Popularity: 2% [?]
Related posts:
- Create and mount ISO image under Solaris
- NFS-mount “Permission denied” error
- Resetting Root Password under Solaris
- Solaris performance monitoring
- Solaris One-Liners
- Monitoring Veritas VM problems on Solaris
- Working with ISO images on Solaris
- Solaris boot disk copy using dd
- Using pkg-get on Solaris
- Apache MySQL PHP Solaris 8 Installation


