LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   A small question about directory permissions (https://www.linuxquestions.org/questions/linux-newbie-8/a-small-question-about-directory-permissions-80961/)

koyi 08-11-2003 10: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)?

Thanks.

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 11:08 AM

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.

HTH

Cool


All times are GMT -5. The time now is 02:25 PM.