cannot delete item as root!!
hi, i'm not a newbie, but this seems a newbie question.
i have a file that i can't delete. it's not allowing me to mv it, chown it, chmod it, rm -f it, ... etc. as ROOT what the hell do i do? openlight:/home/hh98/music/modern# ls -lisa heavenmissangel.mp3 580649 1659563507 b-wSr-xrwt 44379 3923034699 3628644029 79, 179 Apr 30 2011 heavenmissangel.mp3 and of course, when ran df -hav in /home directory, only like 2.5 GB was used, so it cannot be 1.6 TB! anyhoo, i have home on it's own partition, if worst comes to worst, i save what i can and reformat /home, but anyone have any ideas before that? thanks in advance! |
Run fsck on the partition :)
You realize that ls is telling you it's a device file and that it has some really funky permissions; not to mention astronomical owner an group id's for the file. |
you might try chattr - see if that does anything
but it seems more likely that it's time for a fsck - remember to umount the /home partition EDIT: what dark_helmet said - beat me to it :) |
okay, as root i umount /home, did fsck /dev/hda7 (the home partition)
and here's what it said openlight:~# fsck /dev/hda7 fsck 1.36-rc2 (11-Jan-2005) e2fsck 1.36-rc2 (11-Jan-2005) /home: clean, 1047/806400 files, 1144484/1611280 blocks and the file is still there :( |
Aside from booting with a live-cd/rescue disk to run fsck, I don't know what else to tell you. Clearly, something is screwy with the filesystem. If you end up reformatting, I'd suggest ext3 instead of ext2. That would offer more protection against the filesystem getting "confused".
EDIT: Actually, e2fsck is used for ext3 filesystems isn't it? Oh well... I can't be sure it's ext2, but the suggestion for ext3 still stands :) |
alright, thanks! yea it was ext3. i'll go knoppix and reformat as a last resort
|
Just for laughs, what does stat heavenmissangel.mp3 have to say? You can also try to use emacs in directory edit mode (emacs /directory/file/is/in) to edit the directory listing and try to nuke the file. Do back your data up before trying that, though.
|
hey sorry i reformatted already, before i could read your post. if the thing comes back then I'll do the stat thing for kicks. why did this file, and another one as i later discover become device files? is it just hardware integrity issue? rootkit? ext3 random error? i'm using reiserfs for /home now, hopefully things will be good
|
This is just a guess...
I would think it was just a screw up in the filesystem. Unexpected loss of power during disk IO is one possible explanation. Ext3 is supposed to prevent that, but I don't think anything is 100%. In fact, I would go so far as to say it probably happened as the drive was writing the information for a new file. The OS had reserved an inode, had written some preliminary information, and then got cut off.Just enough information was written for the filesystem to think it was a valid entry, but not enough was written to create a coherent entry. Essentially, the filesystem knew where the file was supposed to start, and as it read the bytes on the disk at that location, it was reading somewhat random data, and interpreting it as best it could. When you tried to delete it, there were probably some sanity checks that failed, preventing any change to the disk information. Like I said, it's a guess :) |
thanks :)
|
Quote:
Quote:
Quote:
Mike (mrdvt92) |
All times are GMT -5. The time now is 09:43 AM. |