Reputation: 4496
I'm sending some files to my production server with rsync
and would like to ensure that all users in a group can perform the deploy.
How can I ensure that the rsync script sets both:
So far, the command looks like this, and uploads the files, and sets the permissions that I'd like. However, I'm not sure how to set the group for every single file and folder, recursively.
rsync -rvp --chmod=u+rwx,g+rwx,o=rx public/ [email protected]:/var/www/mysite
I've read you can use the --chown
option, but that keeps giving me the following error: no matches found: --usermap=*:www-data
What's going wrong? Here's the last command that I tried:
rsync -rv -og --usermap=:www-data --groupmap=:www-data --chmod=u+rwx,g+rwx,o=rx public/ slave:/var/www/mysite.com
Upvotes: 3
Views: 1422
Reputation: 4496
This was the command that I ended up using. For some reason, my shell was expanding the --chmod command and failing (due to the *).
rsync -rv -og --usermap="\*:www-data" --groupmap="\*:www-data" --chmod=u+rwx,g+rwx,o=rx public/ [email protected]:/var/www/mysite
Upvotes: 3