Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi Friends,
I have a directory which is empty on a Unix box. It has write permissions to everybody. But i am unable to delete it. Just so that u know i am not the owner.I am planning to ask root user to delete it. Does that mean in unix , a root user can set a directory to not be deleted but only can be updated even with write permissions to everybody.How do i know if a directory can or cannot be deleted in the above scenario?
drwxrwxrwx 2 ssake00 emgroup 512 Jan 9 08:36 bin
->rmdir bin
rmdir: directory "bin": Search or write permission needed

Write permissions on the bin directory means that you have the capability to create new files/directories in that directory, and remove files/directories from that directory (even those that you do not have read/write access to.
You will need write permissions on the directory that bin is in (the parent directory) in order to remove the bin directory.

I think I can do a little better job of explaining that ...
Write permission on a directory controls the contents of that directory - such as ability to create or remove files and directories within that directory. Therefore, write permission on the parent directory controls whether you can remove a directory.
Removing a directory has the same security as creating a new directory. To create a new directory /home/jim, clearly you need write permission on the /home directory. And regardless of what permissions the jim directory was given (to control its contents), you would again need write permission on the /home directory to remove it.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |