public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Jay K <jayk123@hotmail.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Cygwin making files inaccessible?
Date: Sat, 5 Feb 2022 12:16:52 +0000	[thread overview]
Message-ID: <MWHPR1401MB1951297A6F153C14D2A8399EE62A9@MWHPR1401MB1951.namprd14.prod.outlook.com> (raw)

Cygwin making files inaccessible?
i.e. when Cygwin copies or writes to them, not random files.

C:\t>dir /s/b/a

C:\t>dir /q .

02/05/2022  04:11 AM    <DIR>          BUILTIN\Administrators .
02/05/2022  04:11 AM    <DIR>          NT SERVICE\TrustedInsta..

C:\t>cacls .
C:\t Everyone:(OI)(CI)F

C:\t>echo > 1.txt

C:\t>cacls 1.txt
C:\t\1.txt Everyone:F

C:\t>copy 1.txt 2.txt
        1 file(s) copied.

C:\t>cacls 2.txt
C:\t\2.txt Everyone:F

C:\t>del 2.txt

C:\t>uname -a
CYGWIN_NT-10.0-WOW DESKTOP-BCFUMJ4 3.3.4(0.341/5/3) 2022-01-31 19:31 i686 Cygwin

C:\t>cp 1.txt 2.txt

C:\t>which cp
/usr/bin/cp

C:\t>cacls 2.txt
C:\t\2.txt NULL SID:(DENY)(special access:)
                    READ_CONTROL

           DESKTOP-BCFUMJ4\jay:(DENY)(special access:)
                               FILE_READ_DATA
                               FILE_READ_EA
                               FILE_EXECUTE

           DESKTOP-BCFUMJ4\jay:(special access:)
                               STANDARD_RIGHTS_ALL
                               DELETE
                               READ_CONTROL
                               WRITE_DAC
                               WRITE_OWNER
                               SYNCHRONIZE
                               STANDARD_RIGHTS_REQUIRED
                               FILE_READ_ATTRIBUTES
                               FILE_WRITE_ATTRIBUTES

           DESKTOP-BCFUMJ4\None:R
           Everyone:R


C:\t>more 1.txt
ECHO is on.

C:\t>more 2.txt
Cannot access file C:\t\2.txt

Same behavior from cygwin64.

C:\t>\cygwin64\bin\uname -a
CYGWIN_NT-10.0 DESKTOP-BCFUMJ4 3.3.3(0.341/5/3) 2021-12-03 16:35 x86_64 Cygwin

Huh?

I would hope Cygwin could/would just copy the ACLs asis.
I am guessing there is some failed attempt to translate them
to an internal form and then back to NT form.

My real scenario was open/write/read, not cp.exe.

 - Jay

             reply	other threads:[~2022-02-05 12:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-05 12:16 Jay K [this message]
2022-02-07  5:23 ` Jay K
2022-02-07  7:01   ` Andrey Repin
2022-02-07 20:07   ` Brian Inglis
2022-02-07  7:49 Roland Schwingel

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=MWHPR1401MB1951297A6F153C14D2A8399EE62A9@MWHPR1401MB1951.namprd14.prod.outlook.com \
    --to=jayk123@hotmail.com \
    --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).