Re: Ext2fs getting hosed by fsck

James Mastros (root@jennifer-unix.dyn.ml.org)
Mon, 11 Aug 1997 00:57:38 -0400 (EDT)


On Sun, 10 Aug 1997, Albert D. Cahalan wrote:

>
> Take a good look at that. None of the files have the owner write
> bit set, which would be the eigth bit I think. The device numbers
> generally range from 32 to 116. It looks like ASCII text got into
> your inodes.
>
> Why does e2fsck keep the '?' files? They seem completely
> illegal, at least as far as /bin/ls can tell.
>
Umm... It could be that just the permissions were screwed, but the data is
fine. It's happend to me... I ran a "less" on it, did a chmod, and put it
back where it belonged.

> If e2fsck finds several severely corrupt inodes, I think it
> should go into a suspicious mode that throws out anything
> with extremely weird permissions. For example, I've never
> seen ------x-w- on a real file. AFAIK, Linux only uses the
> sticky bit on directories: any non-directory with that flag
> is corrupt. Suid and sgid have no meaning for device special
> files, so those are invalid too.
>

OTOH, a "suspicious" mode sounds good, but it shouldn't automaticly be
initated. IMHO, the basic rule of e2fsck is that it should recover whatever
possible, whenever possible. Perhaps, however, e2fsck should set the
permissions to 0600 and zero out the attributes (unless the data appears to
be a valid directory). That way, you can always get at the data without
going to extreme mesures...

-=- James Mastros
access the data.