How to set file/folder permissions using Rsync from Windows to Linux

Solution 1:

You can set the perms using the --chmod parameter e.g.

--chmod=Du=rwx,Dgo=rx,Fu=rw,Fog=r 

will force the permissions to be set to 755 for Directories and 644 for Files.

Solution 2:

The --chmod argument syntax mentioned in the above is not quite accurate. When you specify owner, group, or other, and don't precede it with a "D" or a "F", it will apply that to all types of files, and it will apply the last parameter it finds as the default. This would explain why your directories were coming out as 744, since the last parameter in the argument was og=r.

Try this instead:

--chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r