Why does group permission hide other permission?

2

1

I just noticed that on Centos 4, a file's group permissions hide the other permissions if you are a member of the group. I would think they would be OR(ed) together? For example:

drwx---r-x   1 NotMe GroupIAmIn  6 Jul 28 04:51 someDirectory

If I am a member of GroupIAmIn I am unable to cd to someDirectory even though other permissions allow this.

I'm wondering why this is the current behavior (what is the motivation) and whether this is standard Linux behavior?

WilliamKF

Posted 2012-07-28T18:50:37.260

Reputation: 6 916

Answers

4

Because you are explicitly saying that users on that group are not allowed to have any access to that directory, anyone else has.

Permissions in Linux are very powerful and strict.

In that case the owner has complete read, write, execute permissions, others have read and execute permission but the group has explicitly no access what so ever to that directory and since your user belongs to GroupIAmIn you have no access to that directory.

This is not unique to CentOS.

Bruno Pereira

Posted 2012-07-28T18:50:37.260

Reputation: 6 450

I might be confused, but isn't he asking why he can't enter the folder even though he's actually in the group owning the folder? Where does it specify that "GroupIAmIn" does not have access? – pzkpfw – 2013-05-28T07:22:32.873