Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-Id: <3.0.5.32.20020922105644.0080fcb0@h00207811519c.ne.client2.attbi.com> X-Sender: pierre AT h00207811519c DOT ne DOT client2 DOT attbi DOT com Date: Sun, 22 Sep 2002 10:56:44 -0400 To: Matt Swift , cygwin AT cygwin DOT com From: "Pierre A. Humblet" Subject: Re: chmod: unexpected results when uid = gid for a file In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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. Pierre -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/