rsync permission denied created directories have no permissions

Posted on 2011-04-26
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@

/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?
Question by:NewtonianB
    LVL 31

    Expert Comment

    rsync -av <SOURCE_DIR> rsyncuser@

    I am not sure on Windows side about the source path.
    LVL 31

    Accepted Solution

    This command would work on Linux at least.  Note that rsync does not need to mention ssh--at least on Linux.
    LVL 3

    Expert Comment

    If you're attempting to maintain permissions, use -avz instead of -rvz.
    I use rsync daily, but not from cygwin.

    Author Comment

    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

    anyways amazing thanks again
    LVL 31

    Expert Comment

    You are most welcome.  Glad it worked.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Adobe Acrobat DC "Out of Memory" 7 85
    Convert 5 digit numbers to date 10 79
    VMWare Workstation 12.0 3 69
    Burning ISO Win/Mac 21 35
    A high-level exploration of how our ever-increasing access to information has changed the way we do our jobs.
    Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
    This video shows how use content aware, what it’s used for, and when to use it over other tools.
    XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now