Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!purdue!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!hp4nl!uva!betty!dik From: dik@uva.UUCP (Casper H.S. Dik) Newsgroups: comp.unix.wizards Subject: Re: Inodes Message-ID: <662@uva.UUCP> Date: 8 Mar 89 19:50:48 GMT References: Sender: news@uva.UUCP Reply-To: dik@uva.UUCP (Casper H.S. Dik) Distribution: comp Organization: Faculteit Wiskunde & Informatica, Universiteit van Amsterdam Lines: 73 In article tale@pawl.rpi.edu writes: >The situation is this: /develop has four subdirectories names >consult1.[1|2|3|4]. consult1.1 and .3 both are fine, but consult1.2 >and .4 have a problem with ..: getwd() can't open it, which breaks a >lot of things that normally would happen in a directory tree, from a >simple pwd to trying to compile with -g. Now, I know why those things >break so please don't explain it. The problem is what the heck is >wrong with /develop/consult1.[2|4]/..? The inode number appears >consistent (shares the inum of .) and the number of links are correct. >Additionally, fsck didn't turn up anything; it things the whole system >is just ducky. > >Any ideas? Thanks in advance for your help. Are your subdirectories consult1.[24] mount points? If that is the case you have the permissions of the directories you mounted your filesystems in wrong. This doesn't show up with fsck, or ls (after mounting). Fix: umount the offending filesystems and chmod 755 the mount points. I wonder whether this comes from Berkeley or from ancient times. This is roughly what can happen (Sun3/SunOS 3.5:) Script started on Wed Mar 8 20:18:43 1989 # ls -ld /mnt # This is wrong ... drwx------ 2 root 24 Sep 15 1986 /mnt # mount /dev/sd2c /mnt # ls -ld /mnt # ... but looks ok ... drwxr-xr-x 3 root 1024 Feb 2 19:33 /mnt # cd mnt # ls -la # ... ok here too .. total 2 drwxr-xr-x 3 root 1024 Feb 2 19:33 . drwxr-xr-x 19 root 1024 Mar 7 21:35 .. # su bin # Become a non-superuser .. $ ls -la # ... now where is '..'? .. not found total 1 drwxr-xr-x 3 root 1024 Feb 2 19:33 . $ pwd # '..' lost here too? getwd: can't open .. $ exit # cd / # umount /mnt # Fix the problem. # chmod 755 mnt # mount /dev/sd2c /mnt # su bin $ cd /mnt $ ls -la # Everything fine now. total 2 drwxr-xr-x 3 root 1024 Feb 2 19:33 . drwxr-xr-x 19 root 1024 Mar 7 21:35 .. $ exit # umount /mnt script done on Wed Mar 8 20:22:33 1989 >Dave >-- > tale@rpitsmts.bitnet, tale%mts@rpitsgw.rpi.edu, tale@pawl.rpi.edu --cd Casper H.S. Dik University of Amsterdam | dik@uva.uucp The Netherlands | ...!uunet!mcvax!uva!dik