I'm running Ubuntu 9.04 with a ext3 filesystem. A while ago I was hacking on the flock 2.0 source and I have just tried to delete the source directory, but a single file could not be deleted when using the rm -rf command. So, now I'm in the following state:

#:$ sudo rm wizWaterMark.bmp.svn-base 
rm: cannot remove `wizWaterMark.bmp.svn-base': Operation not permitted
#: ls -lahi
467275 drwxr-xr-x     2 elijah elijah 4.0K 2009-07-29 11:22 .
467273 drwxr-xr-x     3 elijah elijah 4.0K 2009-07-29 11:22 ..
467289 sr-s---r-t 53288  43274  44934 2.6G 1922-12-30 08:51 wizWaterMark.bmp.svn-base
#: stat wizWaterMark.bmp.svn-base
  File: `wizWaterMark.bmp.svn-base'
  Size: 2708289673  Blocks: 1904771944 IO Block: 4096   socket
Device: 806h/2054d  Inode: 467289      Links: 53288
Access: (5505/sr-s---r-t)  Uid: (43274/ UNKNOWN)   Gid: (44934/ UNKNOWN)
Access: 1962-09-19 07:25:47.000000000 -0700
Modify: 1922-12-30 08:51:26.000000000 -0800
Change: 2013-08-23 23:56:57.000000000 -0700
#: sudo find . -inum 467289 -exec rm -i {} \;
rm: remove socket `./wizWaterMark.bmp.svn-base'? y
rm: cannot remove `./wizWaterMark.bmp.svn-base': Operation not permitted

What I have just done is establish that I can't delete the file using rm. Nor does unlink work. I then tried to delete the file using the inode and that didn't work as well. Somehow this file/socket got installed when I was compiling or checking out the flock source. From what I can tell it is a socket file. How do I get rid of it?

link|improve this question
feedback

1 Answer

up vote 6 down vote accepted

To me it looks like filesystem corruption, because that .svn-base file should not be a socket: it should contain the base revision of the wizWaterMark.bmp file checked out from subversion.

Some hints should come from dmesg, but I would immediately remount the filesystem readonly (mount -o remount,ro /mountpoint) and do an fsck on it.

Good luck!

link|improve this answer
Thanks! That was exactly the problem. I had to do a fsk -f in order to force the check because the filesystem was marked clean. – Elijah Jul 29 '09 at 20:42
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.