LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-15-2011, 03:12 PM   #1
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Rep: Reputation: 0
unable to remove user home directory


CentOS 5.5. attempting to remove a home directory that is currently not assigned to any group or user.
Code:
[root@computer home]# ls -lah
total 20K
drwxr-xr-x 14 root       root       4.0K Nov 14 15:09 .
drwxr-xr-x 26 root       root       4.0K Nov  8 14:31 ..
drwx------  4  511        511       4.0K Nov 14 17:11 olduser
drwx------  4  511        511       4.0K Jul  6 10:41 olduser2
drwx------  3  512        512       4.0K Nov 10 16:25 share

[root@computer home]#
Someone previously removed the users but left the mail and home dir.

Code:
[root@computer home]# rm -rf olduser
rm: cannot chdir from `.' to `olduser': Permission denied
[root@computer home]#
I tried rm and rmdir but I can't even cd into the directory. Any suggestions?

Last edited by daisychick; 11-15-2011 at 03:30 PM.
 
Old 11-15-2011, 03:34 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Is that directory local, or mounted from an NFS share?
 
Old 11-15-2011, 03:48 PM   #3
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
derpa derp. Nice catch. Totally NFS. How could you tell? From the output or from the behavior?
 
Old 11-15-2011, 03:50 PM   #4
inoculos
Member
 
Registered: Apr 2009
Location: Seattle
Distribution: Arch, Crunchbang, Fedora
Posts: 38

Rep: Reputation: 6
Forgive me if i'm missing something, Doesn't the number 511 refer to the owner of the file? maybe something like

su
userdel -r 511
 
Old 11-15-2011, 03:51 PM   #5
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
I was able to delete them by deleting the user on the NFS share system.
 
Old 11-15-2011, 03:52 PM   #6
inoculos
Member
 
Registered: Apr 2009
Location: Seattle
Distribution: Arch, Crunchbang, Fedora
Posts: 38

Rep: Reputation: 6
Oh just saw that, sorry
 
Old 11-15-2011, 04:37 PM   #7
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Quote:
Originally Posted by daisychick View Post
derpa derp. Nice catch. Totally NFS. How could you tell? From the output or from the behavior?
Any time you get a permission denied message when you try to "rm -f" a file while you're root (ignoring drives mounted in read only mode), chances are the file isn't local. NFS is the easiest explanation for why that might be.

Last edited by suicidaleggroll; 11-15-2011 at 04:38 PM.
 
Old 11-15-2011, 06:05 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by daisychick View Post
derpa derp. Nice catch. Totally NFS. How could you tell? From the output or from the behavior?
Experience ;}


Behaviour - if root can't delete files it's either "not on his box", and root_squash
enabled, or something seriously wrong w/ the underlying fs ...
 
Old 11-15-2011, 11:13 PM   #9
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
thanks to all for the input
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] 'Could not chdir to home directory /home/[user]: Permission denied' arashi256 Linux - Newbie 25 11-11-2011 09:29 AM
Unable to access home directory of AD user after logging in via SSH with Samba transient Linux - Software 1 08-24-2011 12:01 PM
[SOLVED] How can i change my HOME (/home/user) directory location to something else? QueenZ Linux - Newbie 6 08-05-2010 06:26 AM
Unable to remove directory twk Linux - Software 3 10-13-2009 08:12 PM
Active Directory User Cannot Write to Samba Home Directory jonwatson Linux - Networking 2 12-19-2006 12:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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