There should be a simple answer to this, but I can't find it.

~me/work>ls -la
drwxrwxr-x  3  me       mygroup  .
drwxrwxr-x  3  me       mygroup  ..
drwxrwxr-x  3  me       mygroup  folder1
drwxr-xr-x  3  person2  mygroup  folder2

This is in my home directory, which is an automounted NFS. Somebody in my group created folder2 in my home directory and then left for vacation.

I can't delete the folder... I can't move it... can't change permissions on it. How can I get rid of it? My sysadmin has no clue.

link|improve this question
John, try on serverfault.com – Chris Lively Dec 18 '09 at 16:12
Thanks... i searched there but couldn't find anything, so I posted there also. – John Ellinwood Dec 18 '09 at 16:28
feedback

migrated from stackoverflow.com Dec 18 '09 at 17:07

This question came from our site for professional and enthusiast programmers.

3 Answers

If you're talking to your sysadmin just get him to run within the directory

su -c "rm -r folder\ 2"

Or

su -c "chown [me] folder\ 2"

where [me] is your username... and delete it yourself

I'll look into another way - but these will certainly work

link|improve this answer
Doesn't work as root on my local machine. Does it have to be root on the NFS server? – John Ellinwood Dec 18 '09 at 16:25
1  
if the no_root_squash option is missing from /etc/exports then yes – cstamas Dec 31 '09 at 0:58
or you can become person2 on your local machine and then delete it – The Unix Janitor Apr 27 '10 at 16:12
feedback

Are you able to remove the entire parent directory (~me/work)?

If so, copy all but folder2 elsewhere, and remove the parent.

link|improve this answer
1  
I don't think this will work because you won't be able to remove the entire parent directory if you don't have write access to all of its contents – Richard Dec 18 '09 at 16:19
I can move the folders around all I want... I just can't delete it. – John Ellinwood Dec 18 '09 at 16:24
feedback

I don't think you can delete this. Can't your sysadmin delete it for you with the root account?

link|improve this answer
I don't know that much about NFS.. and he doesn't either apparently. Root on my machine doesn't help... still permission denied. Would root on the NFS server be required? – John Ellinwood Dec 18 '09 at 16:23
4  
Privileges are managed by the NFS server, so you have to be either person2 or root on NFS server to remove that folder. – mouviciel Dec 18 '09 at 16:26
1  
Or disable root squashing on the NFS server... – James Dec 22 '09 at 23:51
feedback

Your Answer

 
or
required, but never shown