Skip to content

Instantly share code, notes, and snippets.

@kevin-ashton
Last active March 13, 2018 07:24
Show Gist options
  • Save kevin-ashton/b8987b9b081ff8ffbf69 to your computer and use it in GitHub Desktop.
Save kevin-ashton/b8987b9b081ff8ffbf69 to your computer and use it in GitHub Desktop.
Rsync chmod permissions from windows
You can set the perms using the --chmod parameter e.g.
rsync --verbose --delete --recursive -p --chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r /cygdrive/c/src/ user@host:~/src/
will force the permissions to be set to 755 for Directories and 644 for Files.
See https://serverfault.com/questions/233567/how-to-set-file-folder-permissions-using-rsync-from-windows-to-linux/233586#233586 though his code didn't work correctly for me. Needed to specify the directory and folder (F & D) on the group and others (go).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment