Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.