-   Linux - General (
-   -   Strange file type - Unable to delete the file (

kk2202 08-10-2009 07:35 AM

Strange file type - Unable to delete the file
Hi all,

My make fails with an error menitoned below:
rm: cannot remove directory `/xxx/yyy/zzz/bin': Directory not empty
make[3]: *** [dist] Error 1

when I do a ls -ltr at /xxx/yyy/zzz/bin,I see the following
$ ls -ltr
total 0
?---------+ ? ? ? ? ? test

I am not clear how this got created. And I am unable to remove this file from the directory. Due to which my make is failing.

$ rm test
rm: cannot remove `test': No such file or directory

Kindly let me know how to solve this issue. How can I remove this file rm -rf and the other options did not work.

watcher69b 08-10-2009 09:12 AM

file could be set immutable.

tredegar 08-10-2009 10:29 AM


when I do a ls -ltr at /xxx/yyy/zzz/bin,I see the following
$ ls -ltr
total 0
?---------+ ? ? ? ? ? test
This can be a sign of filesystem corruption. Perhaps you should run fsck on that partition.

forrestt 08-10-2009 11:22 AM

If you are running with selinux in enforcing mode, it will also give that type of listing if you don't have a policy setting to allow you to read the file. Since you don't want the directory, try "rm -rf xxx/yyy/zzz/bin" instead of rmdir.



unSpawn 08-10-2009 11:51 AM

Access permissions are visible at all times, ownership is only left untranslated if the Id doesn't exist (and since SELinux operates on top of DAC this would be an odd policy rule AFAIK). So I second running fsck.

i92guboj 08-10-2009 12:00 PM


If you can't detect file system corruption I'd also try rkhunter. The only time I've seen a rootkit on one of my machines I detected a few files like this one. I couldn't delete them and fsck didn't report anything. Finally I had to use debugfs to remove them. This was on a grsecurity hardened machine by the way.

forrestt 08-10-2009 12:00 PM

OK, odd it may be, but I've seen it many times first hand. Running fsck won't hurt in any event. Just make sure you are running it on an unmounted partition if you are in a "fixing" mode.


All times are GMT -5. The time now is 03:40 PM.