Computing.Net > Forums > Unix > Problem with rmdir command

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Problem with rmdir command

Reply to Message Icon

Name: Braveking
Date: January 9, 2004 at 10:26:44 Pacific
OS: AIX
CPU/Ram: 512
Comment:

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




Sponsored Link
Ads by Google

Response Number 1
Name: James Boothe
Date: January 9, 2004 at 11:36:20 Pacific
Reply:

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.


0

Response Number 2
Name: James Boothe
Date: January 9, 2004 at 11:59:52 Pacific
Reply:

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.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Problem with rmdir command

strange problem with echo and read www.computing.net/answers/unix/strange-problem-with-echo-and-read/4618.html

sed problem with regular expression www.computing.net/answers/unix/sed-problem-with-regular-expression/6876.html

problem with telnet www.computing.net/answers/unix/problem-with-telnet/1182.html