LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-24-2011, 04:17 AM   #1
Andy Alt
Member
 
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware64-stable, Manjaro, Debian64 stable
Posts: 528

Rep: Reputation: 167Reputation: 167
root unable to rm -rf dirs and files


I have a directory I'm unable to delete, and the files it contains.

Permission are 755, the parent dir is 755, and it's parent is 1777 and the mount point.

1777 755 755
/mnt/fs3/Builds/crazydir/files

Other files and dirs under "Builds" I can delete, but not crazydir, nor the files it contains.

I can't do anything to crazydir; I can't move it, I can't chown it, even to root.root (and it's already set to root.root), using rm -rf on it gives me messages like:

rm: cannot remove `tmp/install': Permission denied

Anything I do to it gives me a permission denied error.

stat shows me:
Access: (0755/drwxr-xr-x

As root, I've done chmod ugo+rw -R crazydir
It changes permissions on all the files except for the subdirectories. And yet still I can't delete and of the files in crazydir.

fs3 is an lvm partition.

I've run fsck -f on it, and it came up clean.
 
Old 01-24-2011, 04:51 AM   #2
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Hi,

did you check the attributes on those directories?
lsattr /mnt/fs3/
lsattr /mnt/fs3/Builds/
lsattr /mnt/fs3/Builds/crazydir/

I assume that you tried to remove them as root and not just as normal user.
 
1 members found this post helpful.
Old 01-24-2011, 12:02 PM   #3
Andy Alt
Member
 
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware64-stable, Manjaro, Debian64 stable
Posts: 528

Original Poster
Rep: Reputation: 167Reputation: 167
Thanks; chattr -R =e was what I needed. Strange, I never have used chattr before; I wonder how this dir became haywired.

And yes, I had been running everything as root.

Thanks a lot, that was 1.6megs that will never bother me again.
 
  


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
[SOLVED] How to find root files and dirs in some dir? Mr. Alex Linux - Newbie 2 11-01-2010 12:56 AM
rsync dirs w/o o+x perms (as root) guttersnipe Linux - Software 2 06-04-2009 10:54 PM
Root Unable to delete files of unknown type Slowfamily Linux - General 1 06-20-2008 06:10 PM
ls, dirs first, files later TroelsSmit Linux - Newbie 4 05-31-2004 11:47 AM
hiccup: dirs off root showed up as files bdp Linux - Hardware 0 07-19-2002 12:38 PM

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

All times are GMT -5. The time now is 03:12 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