From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <743-406-3965@kylheku.com> Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) by sourceware.org (Postfix) with ESMTPS id 8A3D93858022 for ; Thu, 24 Dec 2020 21:13:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8A3D93858022 Received: from kylheku.com ([70.79.163.252]) by shaw.ca with ESMTPA id sXvDkHtH8tdldsXvEkqv06; Thu, 24 Dec 2020 14:13:21 -0700 X-Authority-Analysis: v=2.4 cv=INe8tijG c=1 sm=1 tr=0 ts=5fe50471 a=95A0EdhkF1LMGt25d7h1IQ==:117 a=95A0EdhkF1LMGt25d7h1IQ==:17 a=IkcTkHD0fZMA:10 a=SMorJkV_YP8A:10 a=zTNgK-yGK50A:10 a=2KUf1mbJAAAA:8 a=c2LMvHdCoT-8wwEPShsA:9 a=QEXdDO2ut3YA:10 a=LME9DoRMzU6P72L8X6EC:22 Received: from www-data by kylheku.com with local (Exim 4.72) (envelope-from <743-406-3965@kylheku.com>) id 1ksXvD-0003Nt-Ao; Thu, 24 Dec 2020 13:13:19 -0800 To: "Kaz Kylheku (Cygwin)" <743-406-3965@kylheku.com> Subject: Re: chmod issue on 3.1.7. X-PHP-Originating-Script: 501:rcmail.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Date: Thu, 24 Dec 2020 13:13:19 -0800 From: "Kaz Kylheku (Cygwin)" <743-406-3965@kylheku.com> Cc: cygwin@cygwin.com In-Reply-To: <7cb8ee6c7e9a36a3c1ee73def342bcb6@mail.kylheku.com> References: <7cb8ee6c7e9a36a3c1ee73def342bcb6@mail.kylheku.com> Message-ID: X-Sender: 743-406-3965@kylheku.com User-Agent: Roundcube Webmail/0.9.2 X-CMAE-Envelope: MS4xfDP+IMQQfng5qhzVq1yp8GLSKVZfSTOPph0WUMn4CQBs91CtlEQGtiKGgo6p+ettrbNpZjZZQsJtVma2mjMciSCiNzWENH9iu2NglTUcQzTjXCE+4/2G IQl5KraO23Mv+dMTLE/Kil6JMXBCh/j8/kUanRMtD4SyWg3MxCk9ly0vLIEHSbRgyDL2Km9YzowZIg== X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, FROM_STARTS_WITH_NUMS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2020 21:13:25 -0000 On 2020-10-10 09:32, Kaz Kylheku (Cygwin) via Cygwin wrote: > Hi all, >=20 > Running this Cygwin on a Windows 10 system: >=20 > 0:DESKTOP-K8055OB:~$ uname -a > CYGWIN_NT-10.0-WOW DESKTOP-K8055OB 3.1.7(0.340/5/3) 2020-08-22 19:03 > i686 Cygwi >=20 > When a file is created, and permissions set as follows: >=20 > 0:DESKTOP-K8055OB:~$ touch tempfile > 0:DESKTOP-K8055OB:~$ chmod 03777 tempfile > 0:DESKTOP-K8055OB:~$ ls -l tempfile > -rwsrwsrwt 1 kaz kaz 0 Oct 10 08:59 tempfile >=20 > Then "chmod u=3D" is not able to clear the owner's permissions to=20 > nothing: >=20 > 0:DESKTOP-K8055OB:~$ chmod u=3D tempfile > 0:DESKTOP-K8055OB:~$ ls -l tempfile > -rwxrwsrwt 1 kaz kaz 0 Oct 10 08:59 tempfile >=20 > As you can see, it has no effect. The expected value is ----rwsrwt. >=20 > I tried both with 64 and 32 bit Cygwin: same deal. >=20 > This is not a problem with the chmod utility. I ran into this as a=20 > failing > test case against a chmod library function in a programming language. >=20 > http://www.kylheku.com/cgit/txr/tree/tests/018/chmod.tl >=20 > The test cases pass until the "u=3D", which fails in the same way. > This does not use the chmod utility. >=20 > It's an issue with the chmod system call. >=20 > This used to work on my older Cygwin installation, which was around=20 > 2.5. Anyone have a clue about this issue? $ icacls tempfile tempfile NULL SID:(DENY)(Rc,S,RD,WD) BLACKBOX\kaz:(F) BLACKBOX\kaz:(RX,W) Everyone:(RX,W) $ getfacl tempfile # file: tempfile # owner: kaz # group: kaz # flags: -st user::rwx group::rwx other::rwx $ ls -l tempfile -rwxrwsrwt 1 kaz kaz 0 Dec 24 13:09 tempfile $ chmod u=3D tempfile $ ls -l tempfile -rwxrwsrwt 1 kaz kaz 0 Dec 24 13:09 tempfile