12

I got the following command with this error

rsync -avz --links -O /home/jansiatest/.jenkins/workspace/svn_to_demo/trunk/CPS/ jansia@ps27670.dreamhost.com:/home/tasklite/temp
sending incremental file list
./
rsync: failed to set permissions on "/home/tasklite/temp/.": Operation not permitted (1)

But the thing is that i don't want to change permission of "/home/tasklite/temp/". How can i set that?

Jerome Ansia
  • 261
  • 1
  • 2
  • 10

2 Answers2

13

Replace -avz with -rltvz. (The -a option is equivalent to -rlptgoD.)

Kevin DeGraaf
  • 456
  • 3
  • 4
  • Thanks man helped me out too. Though i only needed -rltv (not -rltvz) instaed of -av. Since i only used -av and not -avz to begin with :) – Zeroz Sep 10 '13 at 17:37
  • 1
    This is not good advice. Yes, not trying to set permissions will stop it from setting permissions...but if the user wants permissions set then this is just hiding the real problem. I get this error even though the rsync user and target directory are the same user and the files have 777 permissions... – Cerin Dec 21 '15 at 21:13
5

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

user398140
  • 161
  • 2
  • 4