rsync - failed to set permission - operation not permitted
Solution 1:
Replace -avz
with -rltvz
. (The -a
option is equivalent to -rlptgoD
.)
Solution 2:
Adding --no-p
disables just permissions setting, leaving all other options setup by -a
intact. Another issue often happening is inability to set times this can be sorted by adding -O
which you already have in your code