This is the mail archive of the
mailing list for the Cygwin project.
Re: chmod: unexpected results when uid = gid for a file
- From: "Pierre A. Humblet" <Pierre dot Humblet at ieee dot org>
- To: Matt Swift <swift at alum dot mit dot edu>,cygwin at cygwin dot com
- Date: Sun, 22 Sep 2002 10:56:44 -0400
- Subject: 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: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html