LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 12-17-2009, 04:12 AM   #1
dnadave
LQ Newbie
 
Registered: Aug 2005
Location: Seattle
Posts: 3

Rep: Reputation: 0
Undeletable directory/corrupt directory


Simple question with likely a difficult and/or painful solution.

I have a directory that I'm trying to delete, yet it seems to have supernatural powers. If it had only nine lives, it would be gone by now, but nothing I have tried seems to make the directory removable in any means:

belltown:/home # mv dhenders dhenders1
mv: cannot stat `dhenders': Permission denied
belltown:/home # rm -rf dhenders
rm: cannot remove `dhenders': Permission denied
belltown:/home # chattr -i dhenders
chattr: Permission denied while trying to stat dhenders
belltown:/home # stat dhenders
stat: cannot stat `dhenders': Permission denied
belltown:/home # ls -lh dhenders
ls: cannot access dhenders: Permission denied
belltown:/home # ls -lh
ls: cannot access dhenders: Permission denied
total 92K
d????????? ? ? ? ? ? dhenders

Any ideas on how I might rid my system of this beast? Am I destined for a reformat of this partition as my only resolution?

Thanks!!

Dave H
 
Old 12-17-2009, 04:37 AM   #2
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
what is the output of lsattr ? may be it is set to append only not just immutable.
 
Old 12-17-2009, 05:52 AM   #3
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Time to run fsck on that partition?
 
Old 12-17-2009, 10:26 AM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
In these cases the path is clear to me:

1.- check attributes, if it doesn't work then
2.- fsck, if that doesn't work then it's time to
3.- use debugfs to delete it (at your own risk)

In any case, more than the fact that the file is there, you should be worried *why* is it there. If it's due to disk corruption you should check your drive and do some backups. If not, it can be a buggy kernel, fs driver or even a rootkit.

Last edited by i92guboj; 12-17-2009 at 10:27 AM.
 
Old 12-17-2009, 04:24 PM   #5
dnadave
LQ Newbie
 
Registered: Aug 2005
Location: Seattle
Posts: 3

Original Poster
Rep: Reputation: 0
Deleted directory after reboot

I'm still checking into how it was created. It is a pam_mount created user home directory, so I know why it's there, but how it got into the state it is in is of concern. Right now, my bet is on some malfunction in pam_mount.

As for the output of lsattr, it is the same as for chattr.

I did a hard reboot of the machine this morning as the shutdown was stuck trying to unmount that partition. I was able to delete the directory once the machine came back up. Still, I need to know how things got in the state they were in.
 
  


Reply



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
change default vsftp anonymous accout directory /var/ftp to other directory? hocheetiong Linux - Newbie 2 01-24-2010 06:33 PM
Cannot remove corrupt directory ERobishaw Linux - General 1 08-18-2008 04:30 PM
Can't delete Aol file. Directory is corrupt, help. dannycl General 11 05-18-2006 09:54 AM
Can you explain why OpenSSH would corrupt my Active Directory domain? HGeneAnthony Linux - General 0 08-13-2005 10:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:20 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
Open Source Consulting | Domain Registration