Article View: comp.sys.sun
Article #10954Re: NFS and links... please explain ../../private/usr/lib
From: Casper H.S. Dik
Date: Wed, 15 Feb 1989 16:39
Date: Wed, 15 Feb 1989 16:39
64 lines
2503 bytes
2503 bytes
Cris.Fuhrman@a.coe.wvu.wvnet.edu writes:
> [stuff deleted about accessing ../.. on clients in /usr/lib ]
>From the server, ls -ld /usr yields
>
>lrwxrwxrwx 1 root 11 Jun 3 1988 /usr -> usr.MC68020/
>
>and ls -ld /usr/lib yields
>
>drwxr-xr-x 21 bin 4096 Dec 21 15:46 lib/
>
>Anyone care to comment?
>
>I'm pretty frustrated about the NFS cross mounting kludge... Just when I
>thought I was beginning to like unix...
You stumbled accross one of the nastiest bugs I've encountered.
I had the same problem, and it turned out to be caused by the permissions
set for the mount point.
When you access '..' in the root of a NFS-mounted filesystem, this is
translated to a search for .. in the mount point.
If you the permissions for the mount point aren't right - trouble ahead.
Fix:
umount /usr
chmod a+rx /usr (need both read & execute permission)
mount /usr
This bug once cost me the better part of a day, I dumped the fs and ran
newfs - all to no avail.
I don't know for sure but it seems to happen on normally (not NFS) mounted
filesystems as well.
Let's try.
# chmod 700 /mnt
# ls -ld /mnt
drwx------ 2 bin 24 Sep 15 1986 /mnt/
# mount /dev/sd2c /mnt
# ls -ld /mnt
drwxr-xr-x 3 root 1024 Feb 2 19:33 /mnt/
# su nobody
$ cd mnt
$ ls -ld
drwxr-xr-x 3 root 1024 Feb 2 19:33 .
$ ls -ld ..
. not found
So check all your mount points and chmod a+rx them.
[[ Remember: in order to change the mount point itself, you have to do
the chmod before the file system is mounted there. Otherwise you will be
changing the root directory of the mounted file system (and in the case of
NFS partitions, it might produce an error message). --wnl ]]
--cd
Casper H.S. Dik
University of Amsterdam | dik@uva.uucp
The Netherlands | ...!uunet!mcvax!uva!dik
Technical Details
Message-ID:
<622@uva.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-requestReferences:
<8901260048.AA00056@rice.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: dik@uva.UUCP (Casper H.S. Dik) Newsgroups: comp.sys.sun Subject: Re: NFS and links... please explain ../../private/usr/lib Message-ID: <622@uva.UUCP> Date: 15 Feb 89 16:39:26 GMT References: <8901260048.AA00056@rice.edu> Sender: usenet@rice.edu Organization: Faculteit Wiskunde & Informatica, Universiteit van Amsterdam Lines: 64 Approved: Sun-Spots@rice.edu Original-Date: 7 Feb 89 22:57:24 GMT X-Sun-Spots-Digest: Volume 7, Issue 156, message 2 of 11 X-Issue-Reference: v7n139