Inodes

Casper H.S. Dik dik at uva.UUCP
Thu Mar 9 05:50:48 AEST 1989


In article <TALE.89Mar7015647 at imagine.pawl.rpi.edu> tale at 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 at rpitsmts.bitnet, tale%mts at rpitsgw.rpi.edu, tale at pawl.rpi.edu


--cd

Casper H.S. Dik
University of Amsterdam     |		      dik at uva.uucp
The Netherlands             |                 ...!uunet!mcvax!uva!dik



More information about the Comp.unix.wizards mailing list