Path: utzoo!attcan!uunet!husc6!uwvax!tank!uxc!ksuvax1!tar From: tar@ksuvax1.cis.ksu.edu (Tim Ramsey) Newsgroups: comp.unix.questions Subject: Re: PWD gives getwd: couldn't open .. on world r-x root directories Message-ID: <1181@ksuvax1.cis.ksu.edu> Date: 6 Nov 88 10:03:05 GMT References: <1590@sun.soe.clarkson.edu> <1165@ksuvax1.cis.ksu.edu> <1971@cbnews.ATT.COM> Reply-To: tar@ksuvax1.cis.ksu.edu (Tim Ramsey) Distribution: na Organization: Kansas State University, Dept of Computing & Information Sciences Lines: 39 In article <1165@ksuvax1.cis.ksu.edu> I write: >It seems odd that the permissions of the mount point affect access to the >mounted file system. Is this a bug or feature? In article <1971@cbnews.ATT.COM> lvc@cbnews.ATT.COM (Lawrence V. Cipriani) writes: >This is a feature. The permissions of the mount point determine the permission >of the directory after the mount. The permission on the raw disk only control >access to that disk device as if it was a file. I think you are referring to the special file in /dev. I was commenting on the mount point and the filesystem root directory. To add to the confusion (this is 4.3BSD): % ls -ld /mnt drwxr-xr-x 7 root 512 Aug 7 23:47 /mnt % umount /mnt % ls -ld /mnt drwxr-xr-x 2 root 512 Jan 88 09:12 /mnt % chmod 000 /mnt % ls -ld /mnt d--------- 2 root 512 Jan 88 09:12 /mnt % mount /mnt % ls -ld /mnt drwxr-xr-x 2 root 512 Jan 88 09:12 /mnt The root directory of the mounted filesystem "hides" the mount directory. So you don't see the 000 permissions. I spent a goodly amount of time looking for the problem the first time I ran into this. It appears that access checks are done for both the mount directory and the file system root directory. You have to pass both to read/write/execute. I dunno, but this seems like a bug. -- Timothy Ramsey, USENET Keeper-Upper | Ada: BITNET: tar@KSUVAX1 | Just say NO! Internet: tar@ksuvax1.cis.ksu.edu | UUCP: ... !{pyramid,ucsd}!ncr-sd!ncrwic!ksuvax1!tar