This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: chmod: unexpected results when uid = gid for a file

At 10:44 PM 9/21/2002 -0400, Matt Swift wrote:
>I have observed the following reproducible strange behavior of chmod.
>My conjecture consistent with tests so far is that problems occur only
>when a file's owner is the same as the file's group.
More precisely, uids and gids are mapped to internal Windows identifiers
called SIDs (stored in passwd and group). The phenomenon occurs when the
uid and the gid have the same SID.
Cygwin's file security system is based on Windows Access Control Lists
that allow and deny access rights for specific SIDs.
During an ls -l Cygwin reads the SIDS in the ACL of a file and see if they
correspond to the owner SID (first) or else group SID (second) and maps
then to the mode bits. If the SIDs are the same, the code for group isn't
run and "group" shows "other" (this is a simplified description).

Some of the cases you show can be improved (it's a display issue). However the
very fact that the uid and gid SIDs are the same is bound to cause problems,
for example when uid and gid have different permissions, so this situation
can't really be supported.
Unfortunately there are other cases where mode bits can't be mapped to ACLs.


Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]