Rsync set permissions destination
Hi Everyone,
I'm using rsync to backup all of the websites we have. It's logging in with ssh and using ssh keys so it all goes smoothly.
I like to change the permissions, ownership and group this command is setting on the downloaded files. These permissions, ownerships and groups are completly different from the one we use on the server. Is it possible to make this happen within the rsync command? Or should i run a shell script afterwards to change this?
This is the adjusted (for security reason) command I'm using:
rsync -rlvz --size-only --update --exclude="*\.zip" --exclude="*_-_*" --owner=admin --group=nobody --chmod=a+rwx,g+rwx,o+r -e 'ssh -i [ssh key]' [user]@[server]:[source] [destination]
My quess is that --owner=admin --group=nobody doesn't exists and should be used in the form --owner --group for perserving the ownership and group of the source.
I think the option --chmod=a+rwx,g+rwx,o+r is correct, but strange enough it doesn't change the persmissions to 774. Can someone help me?
Thanks Arian
|