delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/01/24/11:33:01

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 50OGX0pK406482
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 50OGX0pK406482
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=RqRGDGMi
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 14F29385772A
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1737736379;
bh=3yL3xIW8d2I90jEyDgrJgiwRpjI6QjG4x9tm6cIy414=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=RqRGDGMiIXFwxOIt5nz2My1aGEnX55fVXLqHkpoiY2X+K2RWbf9CKtRG85zN5sEyc
BV6wbpFNQY3fDOI/qaXFPXeRJMiCb/8HstBjyAd54gCeDHhW+hORkwH/PT/4Xhi0ZI
GKVXdMUlzkAIdxoelDP9pwVsV9Q1tGwZdvJrm3y8=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 671A63858D1E
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 671A63858D1E
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1737736292; cv=none;
b=wXeJyFa0dsX7ZNaw0g7LFKq/jx2TdVs3v/2pPiWtL/m+o5Iqf09Bo9UXwAiIwqZxstxxHWiPvnAhYndc0wzR5XIAYUghItePT63qMRafUk7Lrbpi1IxsbTF/O0DIVMyF+WUtQcYKxdJSjGvu73gCf2u2ZVFSGjrmgrUr/JkXKpQ=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1737736292; c=relaxed/simple;
bh=IXeoQDjF0xrW8IQJJTR/DLGTuHQItucCAIZk4wCzzeM=;
h=Message-ID:Date:MIME-Version:From:Subject:To:DKIM-Signature;
b=J7A4n1hMpgOvoFLzEGj+iImRHPJrTaVcaC2vBUM9zg1ZxURcox/sv4H7AsB1XHQXNqbCzlJr2Z6mrQHKg1nClPxD6mc250QAb/DYTPXVJoLA8HAmF8Weozx6k+AiEUE/xUSwbrhO5kev2Wr3KvCB5nh0cwaEUevtQ8whFpqjrwM=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 671A63858D1E
Message-ID: <83eee235-af82-44ba-be0a-715096dfa946@systematicsw.ab.ca>
Date: Fri, 24 Jan 2025 09:31:29 -0700
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: Cygwin rsync changes (acl) permissions, even when not asked to?
To: cygwin AT cygwin DOT com
References: <2e1ca179-aec2-420f-8a57-50e59e2b1761 AT emmenlauer DOT de>
<97ddb360-b86f-499a-8116-f72b538ca7fc AT gmail DOT com>
<e5da44a4-15ca-4480-8c64-4cbb0ca66745 AT SystematicSW DOT ab DOT ca>
Organization: Systematic Software
In-Reply-To: <e5da44a4-15ca-4480-8c64-4cbb0ca66745@SystematicSW.ab.ca>
X-Rspamd-Server: rspamout06
X-Rspamd-Queue-Id: 4805D20024
X-Stat-Signature: 8k9xtn7ets43oytb5teayzgwaz8rmuak
X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361
X-Session-ID: U2FsdGVkX1+4UNGY33tjlE0NjuPm/h4ZgFpeYBkhH+o=
X-HE-Tag: 1737736290-418596
X-HE-Meta: U2FsdGVkX19+O7DbR3/l/JwtiWJeibLqv1j0Pgk6sV3H9KrxNeF4cb2eoXv0gZo2bcyVwJY+hinxT7T4ljXNGN80e6fFgbWxNwEBpKCQHJn2vPbHDxQxKiewupf1noFcQ1a21PBCuMDEb1ss1ZbkmFWCvu7tOHPbMRNvw8FPsBFQ4QqjXTzFoB4OjPxu+Nv4xerAYQI5pOB+vhXfPm6iNlJcpb6Z4ce7s4jfq2vx98hSps+PVLQQsu/80brbFiZTclvgVY5/+dx/FA5bBjIiVidmj+Y9YLvbyBdAzQlT7D17mr9ZhA8nOw1oG8fwBgLLIjLxB1h49XBLhaL6HKA5UwPa8u68WBFlFa3GM0v4HSeoOs/jjz/am9v9+7Pga7Cwc8NjMkC1qHUvpppo9MpxvD2SiSfpU6eKBb4+5lc27RPZnpEKtMeFN4lz7luSf2IvNC32mDt6a6b76nSWetmXfJsVzQbxs5nrAXA+vugyjE8=
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: Brian Inglis via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Brian Inglis <brian DOT inglis AT systematicsw DOT ab DOT ca>
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 base64 to 8bit by delorie.com id 50OGX0pK406482

On 2025-01-24 08:36, Brian Inglis via Cygwin wrote:
> On 2025-01-24 02:23, Marco Atzeri via Cygwin wrote:
>> On 24/01/2025 09:32, Mario Emmenlauer via Cygwin wrote:
>>> 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.

Sounds like *rsync* is adding default Windows permissions with +x!

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

> Why clone a git repo with rsync when you can just use git from Linux to Windows?

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

> Created parent and subfolder as a normal Windows or Cygwin user?
To clarify:
Did you create the parent and subfolder as a normal Windows user or as a normal 
Cygwin user?

>>> rsync is version 3.3.0, Cygwin is version 3.5.5-1.

> Are you sure you are running...
Sorry --
Are you sure you are running *Cygwin* rsync - test with `which rsync`, and it is 
best to copy and past the command lines and outputs directly, for example:

$ uname -srvmo
CYGWIN_NT-10.0-19045 3.5.5-1.x86_64 2024-12-20 16:19 UTC x86_64 Cygwin
$ head /proc/version
CYGWIN_NT-10.0-19045 version 3.5.5-1.x86_64 (runneradmin AT fv-az1347-815) (gcc 
version 12.4.0 (GCC) ) 2024-12-20 16:19 UTC
$ which rsync
/usr/bin/rsync
$ rsync --version
rsync  version 3.3.0  protocol version 31
Copyright (C) 1996-2024 by Andrew Tridgell, Wayne Davison, and others.
Web site: https://rsync.samba.org/
Capabilities:
     64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
     socketpairs, symlinks, symtimes, hardlinks, no hardlink-specials,
     hardlink-symlinks, IPv6, atimes, batchfiles, inplace, append, ACLs,
     xattrs, optional secluded-args, iconv, prealloc, stop-at, crtimes
Optimizations:
     no SIMD-roll, no asm-roll, openssl-crypto, no asm-MD5
Checksum list:
     xxh128 xxh3 xxh64 (xxhash) md5 md4 sha1 none
Compress list:
     zstd lz4 zlibx zlib none
Daemon auth list:
     sha512 sha256 sha1 md5 md4

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.

>>>  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?
> 
>> where is located this directory ?

> Also what are the parent and subfolder directory paths and ACLs, particularly 
> DACLs, from getfacl and icacls?

>> Can you provide the cygcheck.out as attachement ?
>> see https://cygwin.com/problems.html

> I have had some success fixing Cygwin ACLs, messed up by Windows programs, using 
> setfacl -b on directories and files, but I sometimes have to fix up directory 
> DACLs using setfacl, then fix up the file ACLs, then permissions.

*NOTE:* current Cygwin *rsync* version has *6 CVEs* against it, and current 
Cygwin *git* version has *2 CVEs* against it, so they need updated soon before 
being used outside firewalls!

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher  but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

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