X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 60F8F3851C22
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1602347580;
	bh=4eXiviKYDrSlChtuZTs71zmPdrsz0ucziOOTaYP5SA0=;
	h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post:
	 List-Help:List-Subscribe:From:Reply-To:From;
	b=JQ9BCDYotgW52U+ICRPNmOwFRJ94PBdiIGiXWLSBbzBnCA8kXU3GFG7ryhceRrwb9
	 2fnuitebspI5H/8GqaBDfDOX60IXhycTAPeN+0IKyBOM5CeGefGh4+gBU3Co04FOG6
	 sihmV7/DnMRRGkCl0qVtzPA1FCa3SUOWmlmqolT0=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B30633857C52
X-Authority-Analysis: v=2.4 cv=bZHV7MDB c=1 sm=1 tr=0 ts=5f81e238
 a=95A0EdhkF1LMGt25d7h1IQ==:117 a=95A0EdhkF1LMGt25d7h1IQ==:17
 a=IkcTkHD0fZMA:10 a=SMorJkV_YP8A:10 a=afefHYAZSVUA:10 a=2KUf1mbJAAAA:8
 a=7BTXHMzaM_zx2-rE9LEA:9 a=QEXdDO2ut3YA:10 a=LME9DoRMzU6P72L8X6EC:22
 a=Z5ABNNGmrOfJ6cZ5bIyy:22 a=jd6J4Gguk5HxikPWLKER:22
To: cygwin@cygwin.com
Subject: chmod issue on 3.1.7.
X-PHP-Originating-Script: 501:rcmail.php
MIME-Version: 1.0
Date: Sat, 10 Oct 2020 09:32:54 -0700
Message-ID: <7cb8ee6c7e9a36a3c1ee73def342bcb6@mail.kylheku.com>
X-Sender: 743-406-3965@kylheku.com
User-Agent: Roundcube Webmail/0.9.2
X-CMAE-Envelope: MS4xfG7AoXVcygAnJR0Z4pg/LF+NqvbmgC1/SO62uGf+Sxk56P6syu7SVW2ave14X7b94NUYlBmQYNW+jcOmXSzP26/SQZj2vtQZ9PhGbjR6+dSaJwuXho5e
 2mPdp00/+5dD9Rogfu6EniZJ5S7nHnOT5pqn+reNs197d56rk09spcCqKVCFPdXzV3hLi+isz90tSg==
X-Spam-Status: No, score=-3.2 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
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: "Kaz Kylheku \(Cygwin\) via Cygwin" <cygwin@cygwin.com>
Reply-To: "Kaz Kylheku \(Cygwin\)" <743-406-3965@kylheku.com>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: "Cygwin" <cygwin-bounces@cygwin.com>

Hi all,

Running this Cygwin on a Windows 10 system:

   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

When a file is created, and permissions set as follows:

   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

Then "chmod u=" is not able to clear the owner's permissions to nothing:

   0:DESKTOP-K8055OB:~$ chmod u= tempfile
   0:DESKTOP-K8055OB:~$ ls -l tempfile
   -rwxrwsrwt 1 kaz kaz 0 Oct 10 08:59 tempfile

As you can see, it has no effect. The expected value is ----rwsrwt.

I tried both with 64 and 32 bit Cygwin: same deal.

This is not a problem with the chmod utility.  I ran into this as a 
failing
test case against a chmod library function in a programming language.

http://www.kylheku.com/cgit/txr/tree/tests/018/chmod.tl

The test cases pass until the "u=", which fails in the same way.
This does not use the chmod utility.

It's an issue with the chmod system call.

This used to work on my older Cygwin installation, which was around 2.5.

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
