We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

rsync permission denied created directories have no permissions

NewtonianB
NewtonianB asked
on
Medium Priority
744 Views
Last Modified: 2013-11-15
I'm trying to push changes to my server through ssh on windows (cygwin) using rsync. The command I am using is:

rsync -rvz -e ssh /cygdrive/c/myfolder/ rsyncuser@192.168.1.110:/srv/www/prj112/myfolder/

/srv/www/prj112/myfolder/ is owned by rsyncuser. My problem is that eventhough with rsync the sub directories are create as they publish, each directory is assigned default permission of d--------- so rsync fails to copy any files inside it.

How do I fix this?
Comment
Watch Question

CERTIFIED EXPERT

Commented:
Try
rsync -av <SOURCE_DIR> rsyncuser@192.168.1.110:/srv/www/prj112/myfolder

I am not sure on Windows side about the source path.
CERTIFIED EXPERT
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
If you're attempting to maintain permissions, use -avz instead of -rvz.
I use rsync daily, but not from cygwin.

Author

Commented:
respect farzanj!!!!! that worked i don't know why the other way had all these permission issues. WIth the other way after every pass it would create a directory level, then on the server i would do a chmod -R 775 then when i reran rsync it would again be able to sync one level deeper and so on as I had to fix all permission issues.
I've been reading this post which is essentially
http://cygwin.com/ml/cygwin/2007-08/msg00489.html

anyways amazing thanks again
CERTIFIED EXPERT

Commented:
You are most welcome.  Glad it worked.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.