delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/12/24/16:14:14

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2EADE386F400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1608844406;
bh=VEejcSQ4B34RF/DYsOOTLB8GGyd3l76m379TFkLsL80=;
h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=xC+QSKjldvlx8Mm6Kzv2XijBxF/ljBL5VKIUJvUGOk7fyNAwdyUWleaDF7Z49gPmX
WJhi6IcPS+oab6VPldYUnqprj6yDeGzJ/77/6q/ixdNF8+Uc5fJcAgofb6v+fGiml1
6nKMA7iHosqBvZN1+fIKjUzevrJwVjfrn0VkNCAU=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8A3D93858022
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
To: "Kaz Kylheku (Cygwin)" <743-406-3965 AT kylheku DOT com>
Subject: Re: chmod issue on 3.1.7.
X-PHP-Originating-Script: 501:rcmail.php
MIME-Version: 1.0
Date: Thu, 24 Dec 2020 13:13:19 -0800
In-Reply-To: <7cb8ee6c7e9a36a3c1ee73def342bcb6@mail.kylheku.com>
References: <7cb8ee6c7e9a36a3c1ee73def342bcb6 AT mail DOT kylheku DOT com>
Message-ID: <dbf863dfebf0ed48ed5514d9b3b2ca64@mail.kylheku.com>
X-Sender: 743-406-3965 AT kylheku DOT 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 AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: "Kaz Kylheku \(Cygwin\) via Cygwin" <cygwin AT cygwin DOT com>
Reply-To: "Kaz Kylheku \(Cygwin\)" <743-406-3965 AT kylheku DOT com>
Cc: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

On 2020-10-10 09:32, Kaz Kylheku (Cygwin) via Cygwin wrote:
> 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.

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= tempfile
$ ls -l tempfile
-rwxrwsrwt 1 kaz kaz 0 Dec 24 13:09 tempfile

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019