delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/02/07/02:05:25

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.4.1 sourceware.org B844D3858C83
Authentication-Results: sourceware.org;
dmarc=pass (p=none dis=none) header.from=yandex.ru
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yandex.ru
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;
t=1644217501; bh=XKa0Rx/Xh4nH32WTAEztJET9ZshVE6Xb3K4T8vX3bf8=;
h=In-Reply-To:Subject:From:Message-ID:References:Date:Reply-To:To;
b=gO2q7PEa3juL5ORk2+A6obVhpmbJuyL1o/2VRW8ZQbRFwQQg4U8yO7+JZ51RJCL2t
iP0PTnbAPsrQUNHh04f+rYuU+Kw+FzJqodhJrWKFs3/QaKaP7sx6Xbg/bhNDMuDxGU
1ckGzOPsdhe83a3AoKfYiS5VeSVOis0MgxiXxjLo=
Authentication-Results: iva4-9c2d34c47e67.qloud-c.yandex.net;
dkim=pass header.i=@yandex.ru
X-Yandex-Fwd: 2
Date: Mon, 7 Feb 2022 10:01:33 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
X-Mailer: The Bat! (v6.8.8) Home
X-Priority: 3 (Normal)
Message-ID: <786492895.20220207100133@yandex.ru>
To: Jay K <jayk123 AT hotmail DOT com>, cygwin AT cygwin DOT com
Subject: Re: Cygwin making files inaccessible?
In-Reply-To: <MWHPR1401MB195156661EE5C254E74416AEE62C9@MWHPR1401MB1951.namprd14.prod.outlook.com>
References: <MWHPR1401MB1951297A6F153C14D2A8399EE62A9 AT MWHPR1401MB1951 DOT namprd14 DOT prod DOT outlook DOT com>
<MWHPR1401MB195156661EE5C254E74416AEE62C9 AT MWHPR1401MB1951 DOT namprd14 DOT prod DOT outlook DOT com>
MIME-Version: 1.0
X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_THEBAT,
NICE_REPLY_A, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS,
TXREP, T_SCC_BODY_TEXT_LINE 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 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+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id 21775OPE014791

Greetings, Jay K!

> I looked at this a while. I tried various recent cygwin1.dlls as there were two ACL changes recently.
> I tried building cygwin1.dll with those changes reverted, but failed to build it. 
> For one thing it took me a while to find shilka..it is in cocom, but that wasn't the entire problem.

> Eventually.. I noticed the behavior was not the same for every
> file/directory/volume. Sometimes it worked ok.
> Though I think the ACLs still get changed quite a bit: "full" expands to "many".
> Of course it has worked plenty for me and everyone else.

> Eventually I tried chmod -R 777 * and this seems to have worked.

> I speculate that some "bad" Cygwin ACLs got created at some point.
>  And maybe cacls wasn't deleting them?? That parts seems wierd. Maybe on directories?
> Possibly due to those two recent changes, or maybe user error, I don't know.

This may happen outside Cygwin tree, when initial ACL's are set in some
interesting way.
One possible solution is to tweak /cygdrive mount point to include "noacl"
flag, deferring all ACL modifications to Windows.

(Please bottom post in this list. Thank you.)


> From: Jay K
> Sent: Saturday, February 5, 2022 12:16 PM
> To: cygwin AT cygwin DOT com <cygwin AT cygwin DOT com>
> Subject: Cygwin making files inaccessible? 
>  
> 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



-- 
With best regards,
Andrey Repin
Monday, February 7, 2022 9:59:12

Sorry for my terrible english...

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