How to tell rsync not to touch the destination directory permissions?
- by Sorin Sbarnea
I am using rsync to sync a directory from a machine to another but I encountered the following problem: the destination directory permissions are altered.
rsync -ahv defaults/ root@hostname:~/
The problem is that in this case the permissions and ownership of the defaults forlder will be assigned to the destination folder.
I do want to keep the permissions for the files and subdirectories but not for the source directory itself.
Also, I do not want to remove any existing files from the destination (but to update them if needed), but I think that current settings are already ok regarding this.
How can I do this?