I am using AWS CodeDeploy to copy files from git to the server. It can't overwrite the files, so I have to move the files to another temp location and then it moves the files from the repo to the original server /var/www
.
I'd like to keep the permissions for the directories and files the same as before and so can I use rsync
to sync only permissions and ownership using the older files in the temp folder to this new folder, but not the files themselves?