X-Recipient: archive-cygwin@delorie.com
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 349493835413
Authentication-Results: sourceware.org;
 dmarc=none (p=none dis=none) header.from=cs.umass.edu
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.umass.edu
Subject: Re: permission 600
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
References: <1804805239.1181531.1641726692666.JavaMail.yahoo.ref@mail.yahoo.co.jp>
 <1804805239.1181531.1641726692666.JavaMail.yahoo@mail.yahoo.co.jp>
From: Eliot Moss <moss@cs.umass.edu>
Message-ID: <abb3ae3c-ba9a-d3bf-fc1e-83a8af5a706d@cs.umass.edu>
Date: Sun, 9 Jan 2022 06:25:44 -0500
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101
 Thunderbird/68.12.1
MIME-Version: 1.0
In-Reply-To: <1804805239.1181531.1641726692666.JavaMail.yahoo@mail.yahoo.co.jp>
Content-Language: en-US
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
 KAM_NUMSUBJECT, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS,
 TXREP autolearn=no autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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 <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
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>
Reply-To: moss@cs.umass.edu
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 209BQ29f027117

On 1/9/2022 6:11 AM, Tatsuro MATSUOKA wrote:
>> ----- Original Message -----
>>
>> From: "Thomas Wolff"
>> Date: 2022/01/09 日 17:51
>> Subject: Re: permission 600
>> Am 09.01.2022 um 07:10 schrieb Tatsuro MATSUOKA:
>>>> ----- Original Message -----
>>>>
>>>> From: "Marco Atzeri"
>>>> To: "cygwin> Date: 2022/01/09 日 14:39
>>>> Subject: Re: permission 600
>>>>
>>>>
>>>> On 09.01.2022 06:28, Tatsuro MATSUOKA wrote:
>>>>> $ echo aaa > test.txt
>>>>> $ ls -l  test.txt
>>>>> -rw-r--r-- 1 user user 4 Jan  9 14:07 test.txt
>>>>> $ chmod 600 test.txt
>>>>> $ ls -l test.txt
>>>>> -rw-r--r-- 1 user user 4 Jan  9 14:07 test.txt
>>>> it works for me
>>>>
>>>> $ ls -l test.txt
>>>> -rw-r--r-- 1 Marco Kein 4 Jan  9 06:35 test.txt
>>>>
>>>> $ chmod 600 test.txt
>>>>
>>>> $ ls -l test.txt
>>>> -rw------- 1 Marco Kein 4 Jan  9 06:35 test.txt
>>>>
>>>> I suspect that having user and group called same
>>>> is the clue
>>>>
>>> Ah! Thanks!
>>>
>>> Tatsuro
>> Did you verify it by using different names?
>> It can hardly be an explanation by POSIX means. If so, it must be some
>> weird consequence of Windows-specific stuff. Maybe a workaround could be
>> found for cygwin?
> 
> I made another windows account and sign in PC with different user name.
> But result for chmod 600 gave the same results.
> I found the workaround for jupyter by readind the code of "paths.py" in jupyter.

You can find the underlying Window permissions using icacls.  Cygwin
has to set up some funky work-arounds to model some of the POSIX
permissions - the two models are substantially different.  Sometimes
clearing back to some nominal Windows permissions and applying
chmod again helps.  "setfacl -b" can help clear out permissions,
etc.  Don't forget that permissions can be inherited from the
containing directory as well.

Other people may be able to offer more specific guidance, especially
if you post the output of icacls.

Best - Eliot Moss

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

