wademi
asked on
Rsync -avu option changing permission on destination - Red Hat
I keeep getting a bunch of errors after executing my rsync command even though the files are copied successfully to the destination.
rsync: chown "filepathe/name.rylhwM" failed: Permission denied (13)Permission denied (13)
I think the errors are generated becuase the Rsync process is trying to apply permission to the files copied to the destination server. This is due to the fact that I am using -avu(-a archive which applies permission.
How can I execute the follwoing rsync command without having rsync attempt to apply CHOWN permission
nohup rsync --verbose -avu $cpsource_IOS/ "$DestDir_IOS/$directory" > /root/rsync/$directory.log &
rsync: chown "filepathe/name.rylhwM" failed: Permission denied (13)Permission denied (13)
I think the errors are generated becuase the Rsync process is trying to apply permission to the files copied to the destination server. This is due to the fact that I am using -avu(-a archive which applies permission.
How can I execute the follwoing rsync command without having rsync attempt to apply CHOWN permission
nohup rsync --verbose -avu $cpsource_IOS/ "$DestDir_IOS/$directory" > /root/rsync/$directory.log
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Can you add the --no-g flag too please and see if that helps? If not, please paste the exact error you get again.
ASKER
I just removed the -avu option and use -r instead. That worked
ASKER
So that got rid of the errors but not all files are being copied so I definitely need the -avu option
the flag "a" (archive) that you're using actually translates to "-rlptgoD", which includes the -p flag
So can you try using instead:
So can you try using instead:
rsync -vurlpgoD --no-p --no-g
ASKER
I searched everywhere on the internet and could not find -vurlpgoD
I took "rlpptgoD", subtracted "p", and added the "vu" that you're already using. The fact that you didn't get any hits isn't really important - have you tried running it in that manner and seeing if you still get the chown errors?
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Will you also let me know the filesystem type of the destination?
ASKER
I got rid of the errors by just using -r and -u in my script
ASKER
Resolved on own
ASKER