delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/01/24/04:22:18

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 50O9MHjw259143
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 50O9MHjw259143
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.2 sourceware.org AA5CA3858CD9
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AA5CA3858CD9
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1737710501; cv=none;
b=K2LQCZTiIFBweeEqPZ/blSIidkJuoh1PSaHtV0/yepJy8me2/1R4MoAxbvoQ9OwBoTtuXQQsf2p0RDrr8Ne75eFcNJW8JOr9yIikhgmoIYuuowxYxRzKsR9jKyLX5Z1Cwrl6kcb45zCCgdSb9NBWmXE/WrGVNQhxqh5YSP07FjM=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1737710501; c=relaxed/simple;
bh=YU23BKpNjERKQ+kDM+KLtZZjQY+dUQ9Cz8DH297e/48=;
h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;
b=bs4q2pWXxvLonW+yKSHuVEjfGh0UO/9MZwc9lucGazMsBgHzeVYedVOclJzuK4PfrdDE5pJMvltpO96HMGjfCRDN8jCzj/2E3l3xFp0GPeYjNSvrlfeAGYx+iIY5cSgPr8xDihv92TEocuglAlXjxSkfpw7SQx2C77MFzaloTd0=
ARC-Authentication-Results: i=1; server2.sourceware.org
Date: Fri, 24 Jan 2025 04:21:37 -0500
To: Mario Emmenlauer <mario AT emmenlauer DOT de>
Cc: cygwin AT cygwin DOT com
Subject: Re: Cygwin rsync changes (acl) permissions, even when not asked to?
Message-ID: <Z5NbobdWpfIc0Q3Y@xps13>
References: <2e1ca179-aec2-420f-8a57-50e59e2b1761 AT emmenlauer DOT de>
MIME-Version: 1.0
In-Reply-To: <2e1ca179-aec2-420f-8a57-50e59e2b1761@emmenlauer.de>
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
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>
From: Glenn Strauss via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Glenn Strauss <gs-cygwin DOT com AT gluelogic 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>

On Fri, Jan 24, 2025 at 09:32:55AM +0100, Mario Emmenlauer via Cygwin wrote:
> 
> Dear All,
> 
> There is an an issue that plagues me when using git in Cygwin.
> 
> I have two developer machines, one with Linux, and one with Windows. On
> the Windows machine, when I clone sources with git, everything works well.
> 
> However, when I then use rsync to copy changes from the Linux machine to
> Windows, the file permissions change on all files! In turn, git complains
> about a new executable permission. And chmod fails to restore the previous
> state.
> 
> Currently, the only way I found to restore a useful state, is to remove
> the whole directory, and clone again from git!
> 
> 
> Here are the details:
> I'm using rsync options --verbose --recursive --delete which in my eyes
> should not modify permissions. I clone with rsync over the already existing,
> unchanged files from git, so there should be anyways no need for rsync to
> re-transfer or modify the files.
> 
> The directory in question is a subfolder on the C: drive, which is an
> NTFS-formatted NVMe. I created the parent folder as a normal user, and did
> not apply any special permissions. In fstab, I leave default Cygwin options.
> 
> rsync is version 3.3.0, Cygwin is version 3.5.5-1.
> 
> From acl checks, it seems that rsync would modify only one of the ACLs.
> The second ACL before is "COMPANY\User:(R,W,D,WDAC,WO)", and after running
> rsync is "COMPANY\User:(F)". I'm not sure what this means, but even less
> I understand why rsync performs this change?
> 
> 
> Here are the detailed permissions *before* running rsync from getfacl and
> icacls:
> 
> # file: CHANGELOG.md
> # owner: COMPANY+User
> # group: COMPANY+User
> user::rwx
> group::r-x	#effective:r--
> group:Authenticated Users:rwx	#effective:rw-
> group:SYSTEM:rwx	#effective:rw-
> group:Administrators:rwx	#effective:rw-
> group:Users:r-x	#effective:r--
> mask::rw-
> other::r--
> 
> CHANGELOG.md NULL SID:(DENY)(Rc,WEA,X,DC)
>              COMPANY\User:(R,W,D,WDAC,WO)
>              COMPANY\User:(DENY)(X)
>              NT AUTHORITY\Authenticated Users:(DENY)(X)
>              NT AUTHORITY\SYSTEM:(DENY)(X)
>              BUILTIN\Administrators:(DENY)(X)
>              BUILTIN\Users:(DENY)(X)
>              COMPANY\User:(RX)
>              NT AUTHORITY\Authenticated Users:(RX,W)
>              NT AUTHORITY\SYSTEM:(RX,W)
>              BUILTIN\Administrators:(RX,W)
>              BUILTIN\Users:(RX)
>              Everyone:(R)
> 
> 
> After running rsync, the permissions from getfacl and icacls are:
> 
> # file: CHANGELOG.md
> # owner: COMPANY+User
> # group: COMPANY+User
> user::rwx
> group::r-x	#effective:r--
> group:Authenticated Users:rwx	#effective:rw-
> group:SYSTEM:rwx	#effective:rw-
> group:Administrators:rwx	#effective:rw-
> group:Users:r-x	#effective:r--
> mask::rw-
> other::r--
> 
> CHANGELOG.md NULL SID:(DENY)(Rc,WEA,X,DC)
>              COMPANY\User:(F)
>              COMPANY\User:(DENY)(X)
>              NT AUTHORITY\Authenticated Users:(DENY)(X)
>              NT AUTHORITY\SYSTEM:(DENY)(X)
>              BUILTIN\Administrators:(DENY)(X)
>              BUILTIN\Users:(DENY)(X)
>              COMPANY\User:(RX)
>              NT AUTHORITY\Authenticated Users:(RX,W)
>              NT AUTHORITY\SYSTEM:(RX,W)
>              BUILTIN\Administrators:(RX,W)
>              BUILTIN\Users:(RX)
>              Everyone:(R)
> 
> All the best,
> 
>     Mario Emmenlauer

Have you tried using git instead of rsync?  'man git'
$ git remote add windows user AT winbox-name-or-ip:path/to/gitrepo
$ git push windows feature-branch
$ git fetch windows

Cheers, Glenn

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