I'm trying to sync specific cron files between 2 servers and change the permissions for them. However, the command I am trying is also changing the permissions on the main directory.Command used:rsync -ai --no-o --no-g --chmod=644 --delete --include='ccron_*' --exclude='*' /etc/ccrons/ root@worker:/etc/cron.d/That causes the directory /etc/cron.d on the destination machine to have the permissions 644 as well.It works when I add wildcard to the source folder (/etc/ccrons/*) but then --delete doesn't work and files that were deleted in the source are not deleted in the destination.I'm using rsync 3.1.0 on Ubuntu 14.04.3 LTS
rsync + chmod only selected files
permissions;rsync;chmod