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

Re: undeletable file



Someone wrote (sorry, I get digest format and forgot to paste the name):

>leisure# ls -l fstobdf
>-rwxr-xr-x   1 root     65535       29640 Oct 17 23:58 fstobdf
>rm: remove `fstobdf', overriding mode 0755? y
>rm: fstobdf: Operation not permitted
>leisure# chown root.root fstobdf
>chown: fstobdf: Operation not permitted
>leisure# rm fstobdf
>leisure# mv fstobdf fstobdf.1
>mv: cannot move `fstobdf' to `fstobdf.1': Operation not permitted

Possible others:  
# chattr -i fstodbdf
# chmod 777 fstodbdf
# rm -f fstodbdf

>I have no idea how the file's ownership got this way, or how to
>remove it.  I haven't tried going to single-user mode yet; I'm on
>a remote connection to this box.

I had a similar predicament when fdisk changed some files to bizarre 
character devices.  Even '?' showed up in the permissions as well as 
the huge group number.  I posted a question on comp.os.linux.setup and 
got an answer that worked.  What has happened is that the inode for 
that file (and probably others) has become hopelessly corrupted.  
Thankfully, you can delete this.

Boot into single user mode so the fs with this file on it is unmounted 
(boot to a root disk if it's on the root partition to make it easier).

# debugfs -w /dev/hda# 		# check man page to be sure;  my notes 
				# aren't here.

debugfs prompt> clri /path/fstodbdf	#clear inode entry for this file
debugfs prompt> rm /path/fstodbdf	#remove this offending file

# e2fdsk /dev/hda#		# make sure everything's hunky dorry. :)

Ta da!

As always, check over the above with the man pages to be sure I'm not 
accidentally giving you the secret to trashing your system beyond 
repair.  ;)

Devin

--
Reply to dbwong@engr.csulb.edu		
http://www.engr.csulb.edu/~dbwong


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: