public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Thomas Wolff <towo@towo.net>
To: cygwin@cygwin.com
Subject: Re: permission 600
Date: Mon, 10 Jan 2022 00:26:32 +0100	[thread overview]
Message-ID: <5b64627d-bc3c-7339-e310-af6d568cb6c5@towo.net> (raw)
In-Reply-To: <13484389.1228247.1641769990069.JavaMail.yahoo@mail.yahoo.co.jp>


Am 10.01.2022 um 00:13 schrieb Tatsuro MATSUOKA:
>> ----- Original Message -----
>>
>> From: "Eliot Moss"
>> To: "cygwin
>> Date: 2022/01/09 日 20:26
>> Subject: Re: permission 600
>>
>>
>> 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
>>
> Because my C drive is not enough, I installed cygwin into USB drive and make home directory on it.
> chmod issue are story files on the usb drive.
> On files on C drive, chmod 600 works as expected.
>
> My workround for jupyter changed :
> export JUPYTER_ALLOW_INSECURE_WRITES=true
> =>
> export JUPYTER_RUNTIME_DIR=/cygdrive/c/Users/user/AppData/Local/Temp
> (/cygdrive/c/Users/user/AppData/Local/Temp "tmp" environmental variable value in my current environment.)
>
> For another usb drive, chmod works as expected.
> chmod does not work  => FAT32
> chmod works => NTFS
I was about to ask...
> I back up all files to the external HDD and  format FAT32 drive to NTFS drive and back them.
You can actually convert a USB drive to NTFS without copying files and 
reformatting,
using $SYSTEMROOT/System32/convert

  reply	other threads:[~2022-01-09 23:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <13484389.1228247.1641769990069.JavaMail.yahoo.ref@mail.yahoo.co.jp>
2022-01-09 23:13 ` Tatsuro MATSUOKA
2022-01-09 23:26   ` Thomas Wolff [this message]
     [not found] <1678276178.1336676.1641891339407.JavaMail.yahoo.ref@mail.yahoo.co.jp>
2022-01-11  8:55 ` Tatsuro MATSUOKA
     [not found] <996962702.1253083.1641813036736.JavaMail.yahoo.ref@mail.yahoo.co.jp>
2022-01-10 11:10 ` Tatsuro MATSUOKA
     [not found] <1804805239.1181531.1641726692666.JavaMail.yahoo.ref@mail.yahoo.co.jp>
2022-01-09 11:11 ` Tatsuro MATSUOKA
2022-01-09 11:25   ` Eliot Moss
     [not found] <517210150.1192809.1641708654835.JavaMail.yahoo.ref@mail.yahoo.co.jp>
2022-01-09  6:10 ` Tatsuro MATSUOKA
2022-01-09  8:51   ` Thomas Wolff
     [not found] <584156248.1199495.1641706088853.JavaMail.yahoo.ref@mail.yahoo.co.jp>
2022-01-09  5:28 ` Tatsuro MATSUOKA
2022-01-09  5:38   ` Marco Atzeri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5b64627d-bc3c-7339-e310-af6d568cb6c5@towo.net \
    --to=towo@towo.net \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).