basic unix (linux) question ...
Hi,
consider these operations. $ mkdir y $ ls -ld y drwxrwxr-x 2 user user 4096 2009-04-15 12:51 y $ chmod 077 y $ ls -ld y d---rwxrwx 2 user user 4096 2009-04-15 12:51 y $ id uid=1001(user) gid=1001(user) $ cd y bash: cd: y: Permission denied why is permission denied ? I may not have permissions to enter dir as owner but still belong to group 'user' which has permissions to enter the directory |
Same result on my system....
Never thought about this before, but the inference is that "permission denied" for the owner trumps "permission granted" for the user group. I switched to a different user and confirmed that I could cd into the directory. |
yep
so does this mean that we are breaking the good old unix standards ? as day-by-day we sophesticate things ? is this supposed to behave this way ? |
I would guess that this is in fact the way Unix works---I don't know why any version of Linux, Gnu, whatever would want to change such a fundamental thing.
If you are terminally curious, install OpenBSD or OpenSolaris and check the behavior........or give Uncle Google a shot.....;) |
In my little knowledge of the *nix internals, you cannot access a directory if it has not the executable bit. Since the permissions for the group are still rwx, other users can descend into the directory.
Also note that if you set the executable bit, but not the read bit Code:
$ chmod 177 testdir |
This simply implies that the permissions applied for a specific user overrides others such as Group and Other.
Quote:
|
All times are GMT -5. The time now is 04:13 PM. |