[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Files with *strange* permissions



I had the same problem where I have two files in /usr/doc/mount/ that were block devices on the README.Debain.gz.

They way I got rid of the files is to go into debugfs. Be careful with this util. You can use debugfs' rm and it will clear the inode. Problem solved.


Hope it helps...
--Jay Barbee

At 03/16/2000 08:32 AM -0500, you wrote:

Guilherme writes that he has encounted files he cannot delete.
partial quote:

> Now, I'm left with one final problem... the files and dirs left on
> /lost+found can't be chown'd, chmod'd or erased... all of them (except
> for one) have the first permission bit (when doing "ls -a -l") either b,
> c or s... also, some of them seem to have a HUGE size (like 4294967295
> in 2 of them), but then when I select them on MidnightCommander it
> recognizes a negative size... Also, some show invalid sizes, like (on
> ls) "1,   7" or "164, 246" (with the spaces)... Also, all of them have a
> name that starts with "#"...

Guilherme:

The #<stuff> filenames can be accessed by escaping the #:

        ls \#rest_of_filename
        #rest_of_filename

For the unalterable files, lsattr gives ext2fs atrributes. chattr
will change these attributes, which include immutable. This will
usually help remove unalterable files. The file system debugger also
will do this job.

--David
David Teague, dbt@cs.wcu.edu
Debian GNU/Linux Because software support is free, timely,
                 useful, technically accurate, and friendly.
                 (I'm hoping this is all of the above!)

On Thu, 16 Mar 2000, Guilherme Soares Zahn wrote:

> Hi there,
>
> I'm facing quite a bad problem here im my Linux Box, and I'd like to try
> a bit more before I give up, format the HD and reinstall it all...
>
> Last tuesday I had to shutdown Linux because I had to do some
work on
> Win98, unfortunately... The shutdown procedure worked fine, I worked all
> afternoon on Win98 and shutdown the machine to go home...
>
> Yesterday I came back and, to my surprise, when I tried to boot on Linux
> the system halted with a "kernel panic: unable to mount root fs on
> 03:02" (I guess these were the numbers)...
>
> Next thing I plugged my HD in another Linux box and ran "e2fsck -y" on
> it... As I already expected, after complaining about a whole lot of
> errors, when it exited I only had a /lost+found" dir, with lots of
> subdirs and files in it...
>
> Lucky enough, by browsing the subdirs I could rebuild the whole root dir
> structure (it seems e2fsck only moved the complete root dirs to
> /lost+found and renamed them with those numeric names - the whole subdir
> tree inisde each of them was 100% preserved), and I was left with some
> empty dirs and some "weird" files that seem to be "undeletable"...
>
> When I tryed to boot, I doscovered the default boot image was corrupted
> (crc error), but lucky enough the other images worked fine, so I just
> booted from one of them and ran "lilo" again; then the computer booted
> fine and everything worked perfectly!
>
> Now, I'm left with one final problem... the files and dirs left on
> /lost+found can't be chown'd, chmod'd or erased... all of them (except
> for one) have the first permission bit (when doing "ls -a -l") either b,
> c or s... also, some of them seem to have a HUGE size (like 4294967295
> in 2 of them), but then when I select them on MidnightCommander it
> recognizes a negative size... Also, some show invalid sizes, like (on
> ls) "1,   7" or "164, 246" (with the spaces)... Also, all of them have a
> name that starts with "#"...
>
>  Lastly, when I run e2fsck again it complains about

> "fsck.ext2: Ext2 file too big while calling ext2fs_block_iterate in pass
> 1b"
>
> and then finds two duplicate blocks (always on the same two pairs of
> inodes)... If I try to run "e2fsck -c" it complains about the "file too
> big" thing and aborts... I'm almost sure it is related to the
> /lost+found files...
>
> Now, how can I get rid of them? Is there a chance, or will I be forced
> to format & install it all again?
>
> TIA,
>
> Guilherme Zahn
>
>
>
> --
> Unsubscribe? mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null
>
>

--David
David Teague, dbt@cs.wcu.edu
Debian GNU/Linux Because software support is free, timely,
                 useful, technically accurate, and friendly.
                 (I hope this is all of the above.)



--
Unsubscribe? mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null


Reply to: