delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/10/10/17:52:34

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E4A873858D37
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
header.from=SystematicSw.ab.ca
Authentication-Results: sourceware.org;
spf=none smtp.mailfrom=brian DOT inglis AT systematicsw DOT ab DOT ca
X-Authority-Analysis: v=2.4 cv=bZHV7MDB c=1 sm=1 tr=0 ts=5f822cea
a=kiZT5GMN3KAWqtYcXc+/4Q==:117 a=kiZT5GMN3KAWqtYcXc+/4Q==:17
a=IkcTkHD0fZMA:10 a=2KUf1mbJAAAA:8 a=uYT-Tk0qkVT609LjNaIA:9 a=QEXdDO2ut3YA:10
a=LME9DoRMzU6P72L8X6EC:22
Subject: Re: chmod issue on 3.1.7.
To: cygwin AT cygwin DOT com
References: <7cb8ee6c7e9a36a3c1ee73def342bcb6 AT mail DOT kylheku DOT com>
<ef27ae60-ac04-a74b-3bed-a927788f6cf4 AT cornell DOT edu>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Autocrypt: addr=Brian DOT Inglis AT SystematicSw DOT ab DOT ca; prefer-encrypt=mutual;
keydata=
mDMEXopx8xYJKwYBBAHaRw8BAQdAnCK0qv/xwUCCZQoA9BHRYpstERrspfT0NkUWQVuoePa0
LkJyaWFuIEluZ2xpcyA8QnJpYW4uSW5nbGlzQFN5c3RlbWF0aWNTdy5hYi5jYT6IlgQTFggA
PhYhBMM5/lbU970GBS2bZB62lxu92I8YBQJeinHzAhsDBQkJZgGABQsJCAcCBhUKCQgLAgQW
AgMBAh4BAheAAAoJEB62lxu92I8Y0ioBAI8xrggNxziAVmr+Xm6nnyjoujMqWcq3oEhlYGAO
WacZAQDFtdDx2koSVSoOmfaOyRTbIWSf9/Cjai29060fsmdsDLg4BF6KcfMSCisGAQQBl1UB
BQEBB0Awv8kHI2PaEgViDqzbnoe8B9KMHoBZLS92HdC7ZPh8HQMBCAeIfgQYFggAJhYhBMM5
/lbU970GBS2bZB62lxu92I8YBQJeinHzAhsMBQkJZgGAAAoJEB62lxu92I8YZwUBAJw/74rF
IyaSsGI7ewCdCy88Lce/kdwX7zGwid+f8NZ3AQC/ezTFFi5obXnyMxZJN464nPXiggtT9gN5
RSyTY8X+AQ==
Organization: Systematic Software
Message-ID: <ff1ef183-acef-5b58-00d5-876188822725@SystematicSw.ab.ca>
Date: Sat, 10 Oct 2020 15:51:37 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
Thunderbird/68.12.1
MIME-Version: 1.0
In-Reply-To: <ef27ae60-ac04-a74b-3bed-a927788f6cf4@cornell.edu>
X-CMAE-Envelope: MS4xfJ9upviwhC0DSH2la0KHG93n0SrwpP3JdcZXZPi5eT1Bcfk1/4Vl0nvVpHen0uI929XvvWo1KOo1zqGi2VjylUs4kvimRivdPgOnIWqWS7SM5+92VIBP
UyZxGd2Jbulo2iRm95SV0gshAarGAoG45v1bex/hBzl+O0ZbJn9y2S6URCTuHSgZwvsnMmUKOgfiw914ucazXBtNJe56hVNE9ho=
X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,
RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE,
TXREP autolearn=no 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>
Reply-To: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 09ALqGoj027070

On 2020-10-10 13:41, Ken Brown via Cygwin wrote:
> On 10/10/2020 12:32 PM, 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.
> 
> FWIW, I can't reproduce this on my system:
> 
> $ uname -a
> CYGWIN_NT-10.0-WOW XXX 3.1.7(0.340/5/3) 2020-08-22 19:03 i686 Cygwin
> 
> $ touch tempfile
> 
> $ ls -l tempfile
> -rw-r--r-- 1 kbrown None 0 2020-10-10 15:16 tempfile
> 
> $ chmod 03777 tempfile
> 
> $ ls -l tempfile
> -rwxrwsrwt 1 kbrown None 0 2020-10-10 15:16 tempfile
> 
> $ chmod u= tempfile
> 
> $ ls -l tempfile
> ----rwsrwt 1 kbrown None 0 2020-10-10 15:16 tempfile

D/ACLs on the directory could restore/maintain the permissions:
could we please see the output from ls -l, getfacl, and icacls on the directory
and file?

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]
--
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