Nicholas Senedzuk
2007-Jan-10 16:26 UTC
[zfs-discuss] Fix dot-dot permissions without unmount?
Skipped content of type multipart/alternative-------------- next part -------------- _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Jason Austin
2007-Jan-10 16:26 UTC
[zfs-discuss] Re: Fix dot-dot permissions without unmount?
I should clarify. Say I have a zfs with the mount point /u00 that I import on the system. When it creates the /u00 directory on the UFS root, it''s created with 700, and then the zfs is mounted and it appears to have the permissions of the root of the zfs. 755 in this case. But, if a non-root user tries "cd .." while in /u00, they get a permission denied because the /u00 directory is 700 even though it doesn''t show those permissions in ls and they are not changeable with chmod . The only way to fix it is unmount /u00, chmod the mount point, and then remount. That''s fine on my test system but in production where I''ve already started up my database that people are using, I can''t just shut everything down and unmount the /u00 directory. I probably wouldn''t even have noticed this but bash seems to traverse up the directory tree to determine CWD. That creates an error (non fatal in this case) in my oracle startup script that does a "su - oracle -c "/u00/my/start/script.sh"" To reproduce, just unmount any zfs, chmod it''s mount point to 700, remount, and then try to "cd .." from a non-root user from the mount point directory. This message posted from opensolaris.org _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Nicholas Senedzuk
2007-Jan-10 16:26 UTC
[zfs-discuss] Re: Fix dot-dot permissions without unmount?
Skipped content of type multipart/alternative-------------- next part -------------- _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
After importing some pools after a re-install of the OS, i hit that "..: Permission denied" problem. I figured out I could unmount, chmod, and mount to fix it but that wouldn''t be a good situation on a production box. Is there anyway to fix this problem without unmounting? This message posted from opensolaris.org _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Chris Gerhard
2007-Jan-10 16:26 UTC
[zfs-discuss] Re: Fix dot-dot permissions without unmount?
You have to mount the file system using NFS v3 or v2 for this trick to work. See http://blogs.sun.com/chrisg/entry/fixing_a_covered_mount_point --chris This message posted from opensolaris.org _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Casper.Dik@sun.com
2007-Jan-10 16:26 UTC
[zfs-discuss] Fix dot-dot permissions without unmount?
>After importing some pools after a re-install of the OS, i hit that "..: Permission denied" problem. I figured out I could unmount, chmod, and mount to fix it but that wouldn''t be a good situation on a production box. Is there anyway to fix this problem without unmounting? NFS share the containing directory with root access. While generally loopback NFS is frowned upon, you can use it for this purpose: share -o anon=0,rw=localhost / mount -F nfs localhost:/ /mnt chmod 755 /mnt/zfs/mount umount /mnt unshare / Casper _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss