Cygwin rsync changes (acl) permissions, even when not asked to?
Brian Inglis
Brian.Inglis@SystematicSW.ab.ca
Fri Jan 24 15:36:43 GMT 2025
On 2025-01-24 02:23, Marco Atzeri via Cygwin wrote:
> On 24/01/2025 09:32, 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.
Sound like it 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?
>> rsync is version 3.3.0, Cygwin is version 3.5.5-1.
Are you sure you are running
>> 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.
--
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
More information about the Cygwin
mailing list