Link to home
Create AccountLog in
Avatar of wademi
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 &


ASKER CERTIFIED SOLUTION
Avatar of xterm
xterm

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of wademi
wademi

ASKER

sorry. that did not work.
Can you add the --no-g flag too please and see if that helps?  If not, please paste the exact error you get again.
Avatar of wademi

ASKER

I just removed the -avu option and use -r instead. That worked
Avatar of wademi

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:
rsync -vurlpgoD --no-p --no-g

Open in new window

Avatar of wademi

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
Link to home
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?
Avatar of wademi

ASKER

I got rid of the errors by just using -r and -u in my script
Avatar of wademi

ASKER

Resolved on own