LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 08-10-2009, 08:35 AM   #1
kk2202
LQ Newbie
 
Registered: Jan 2009
Posts: 24

Rep: Reputation: 15
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.
 
Old 08-10-2009, 10:12 AM   #2
watcher69b
Member
 
Registered: Nov 2007
Location: /home/watcher69b
Distribution: RH, Fedora & CentOS
Posts: 539

Rep: Reputation: 39
file could be set immutable.


http://linuxhelp.blogspot.com/2005/1...hich-even.html
 
Old 08-10-2009, 11:29 AM   #3
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,038

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Quote:
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.
 
Old 08-10-2009, 12:22 PM   #4
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
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.

HTH

Forrest
 
Old 08-10-2009, 12:51 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,744
Blog Entries: 54

Rep: Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973
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.

Last edited by unSpawn; 08-10-2009 at 12:53 PM.
 
Old 08-10-2009, 01:00 PM   #6
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,049

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Yep.

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.

Last edited by i92guboj; 08-10-2009 at 09:17 PM. Reason: it wasn't selinux, but grsecurity, corrected
 
Old 08-10-2009, 01:00 PM   #7
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
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.

Forrest
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload file to ftp server -vsftp- but can not delete or change the file once uploaded murattas6 Linux - Server 2 06-26-2009 07:00 AM
Root Unable to delete files of unknown type Slowfamily Linux - General 1 06-20-2008 07:10 PM
Get file icon from extension, file type, or mime-type Guitarist88 Programming 3 04-21-2008 11:58 AM
Strange file attributes, can't delete and problems with apt maginotjr Ubuntu 4 04-16-2008 12:28 PM
Strange problem: can not delete file as root ?? hendrixx Linux - General 29 11-11-2004 01:46 AM


All times are GMT -5. The time now is 02:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration