10
5
I'm running an rsync
command, copying my files from a server to my Windows machine like:
rsync -rt --partial-dir=".rsync" --del rsync://server/a/ a/
Whenever this command creates a directory, it tends to create a directory with crazy ACLs/permissions. For me, it tends to create ten <not inherited>
entries, with one deny entry for the user who ran the rsync
command, and the others not making much sense, either. This even happens using the --chmod=ugo=rwX
option, which a similar thread suggested.
What can I do to prevent rsync
from trying to set permissions at all (and just leave the permissions to the ACL inheritance in Windows)?
1@miking already gave a nice hint with that link and the
noacl
option. Didn't work out for me with MobaXterm (portable), as that seems to re-create/etc/fstab
on each start. I partially got around that placingmount -c /drives -o binary,posix=0,user,auto,noacl
into my.bashrc
. "Partially" as this only affects the "Windows drive letters" (and not e.g./home
). – Izzy – 2015-05-13T12:19:44.020Would be great if someone knew how to do this with cwrsync (or any standalone
rsync.exe
that doesn't use the full cygwin). – Simon East – 2017-05-29T04:34:23.330@SimonEast - Any luck with finding what options to make this work with CwRSync? – Alex S – 2019-10-24T09:41:34.880
@AlexS I never got it working reliably. rsync would work 90% of the time but I still often ended up with some read-only files that needed their permissions reset periodically. Pain in the butt. – Simon East – 2019-10-26T07:22:08.947
1
@SimonEast - Found this while you replied. Could you try this & respond? - https://developers.redhat.com/blog/2018/02/07/windows-rsync-jboss-developer-studio/ - # If you distribution doesn’t have an fstab file, which is typical for
– Alex S – 2019-10-26T11:35:31.590cwRsync
, that is easily fixed. Ccreate the file at$MY_RSYNC_DIST_DIR/etc/fstab
and paste the following content:none /cygdrive cygdrive binary,posix=0,user,noacl 0 0
noacl
does prevent the crazy permissions, but since it fakes permissions with the "readonly" bit, I get a bunch of weird partial read-only directories. This is an improvement. – palswim – 2011-04-14T19:21:19.217How about rsync's
--no-perms
option? – ak2 – 2011-04-15T10:04:37.8031
Actually, it looks like I get that "partial readonly" symptom on any directory (whether
– palswim – 2011-04-15T17:47:21.870rsync
created it or not). It appears Windows is saying just that directories have no readonly property.2
ak2's answer was very helpful to be, but it took quite a bit of googling to find how to setup the
– miking – 2011-12-07T23:11:15.043noacl
in /etc/fstab properly. I found this link quite helpful. Usingnoacl
fixed my rsync problems - thanks.