-   Linux - Newbie (
-   -   A small question about directory permissions (

koyi 08-11-2003 11:24 AM

A small question about directory permissions
I have been wondering about this question for a long time. Consider this situation:

There is a directory named DIR-A and it has a sub-directory named DIR-B. If the permission for DIR-A is rwx------ and permissions for DIR-B is rwxrwxrwx. Will other people be able to view and change the contents of DIR-B(as the permissions allow)?


p/s: What I was trying to say is that will permissions for a directory be influenced by the permissions of the directories above it?

MasterC 08-11-2003 12:08 PM

Yes and no...

If you have ultra restricted permissions on DIR-A, and it's owned only by 1 person/group (such as root.root) then only root can get in to see/change DIR-B (in the above example, if root.root owned DIR-A then anyone not having root privileges would not be able to enter DIR-A to ever see DIR-B regardless of DIR-B's permissions).

To access a directory you only need the x bit set, so you could give x writes on DIR-A, they could access DIR-A, and then have the ability to enter/read/write in DIR-B.



All times are GMT -5. The time now is 05:35 PM.