Re: Weird ext2fs immortal directory bug

From: Andreas Dilger (adilger@turbolinux.com)
Date: Thu Jul 26 2001 - 11:22:52 EST


Dan writes:
> sentry21@Petra:1:/lost+found$ sudo rm -rf \#3147/
> rm: cannot unlink `#3147': Operation not permitted
>
> Weird, ne? I -did- manage to make it -not rwxrwxrwx, suid, sgid, sticky,
> and every other bloody FS flag you can stick on a directory (and lots you
> can't), but it's still impervious to my sk|llz. It's not hurting anything,
> but cron whines about it every day.

Run "debugfs -w /dev/hdX", and then:

debugfs> mi <3147>
# set Mode to 0
# set Deletion time to something other than 0
# set Link count to 0
# set Block count to 0
# set File flags to 0
debugfs> freei <3147>
debugfs> q

e2fsck -f /dev/hdX

Cheers, Andreas

-- 
Andreas Dilger                               Turbolinux filesystem development
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 21:00:28 EST