I'm trying to push changes to my server through ssh on windows (cygwin) using rsync
.
The command I am using is:
rsync -rvz -e ssh /cygdrive/c/myfolder/ [email protected]:/srv/www/prj112/myfolder/
/srv/www/prj112/myfolder/
is owned by rsyncuser
. My problem is that eventhough with rsync
the sub directories are create as they publish, each directory is assigned default permission of d---------
so rsync
fails to copy any files inside it.
How do I fix this?
The option to ignore NTFS permissions has changed in Cygwin version 1.7. This might be what's causing the problem.
Try adding the 'noacl' flag to your Cygwin mounts in C:\cygwin\etc\fstab, for example:
none /cygdrive cygdrive user,noacl,posix=0 0 0
You can pass custom permissions via rsync using the 'chmod' option:
rsync -rvz --chmod=ugo=rwX -e ssh source destination