I'm having problems synchronising file permissions with rsync. I'm trying to sync my /home/bin folder with the /home/bin folder on a remote machine. The problem is that when I write a new script and make it executable with 'chmod +x' then after performing rsync, the file reverts back to being unexecutable.
If I use --perms, when I update the file permissions on the remote machine and then use rsync on the host machine, the file permissions don't get updated on the host machine and on the remote machine they get reverted back.
Is there a way to properly sync the file permissions?
UPDATE: I forgot to post the script I use:
#!/bin/bash rsync -e ssh -avz --recursive --progress --update --perms /home/bin email@example.com:/home rsync -e ssh -avz --recursive --progress --update --perms firstname.lastname@example.org:/home/bin /home