Wrote a bash shell script that uses
rsync to deploy files to live web server.
Right before executing, the script outputs the full command that the my shell script generates:
rsync --chmod="ug=rwx" -e="ssh" --filter="merge .deploy/filters" --dry-run --recursive -v --size-only "/var/www/vhosts/staging/mysite.com/httpdocs/" "firstname.lastname@example.org:/var/www/vhosts/mysite.com/domains/mysite.com/httpdocs"
This is being run inside my shell script like so:
local command=`getDeploymentCommand "$deploy_direction" "$mode"` echo $command echo `$command`
... and produces the following error:
rsync: Invalid argument passed to --chmod ("ug=rwx")
chmod syntax looks correct to me. What's really weird is that the actual command copy-pasted into the shell and executed works fine. Why is this, and how can I make it work?