0

I have an rsync job running in one server that keeps folders in sync. The job is running as root in one server and transferred to a backup server as normal user.

In the origin server one folder (weirdly enough) didn't have x permissions. On the origin server this wasn't a problem because it was run as root but on the remote server because I was using the -a parameter it kept giving errors and it could not update it after the first time.

This is understandable and I think I know how to fix it, which is by using rsync -rlDt in this way the permissions for the original server would not get applied on the destination.

What if I want to have the best of both worlds with my setup though? What if I want to keep permissions as much as possible but perhaps change them (or override - this should be possible as the owner is the destination user) when encountering issues like this one? Is this possible?

  • 4
    Lack of x on a directory prevents traversal rights into that directory. In other words, if traversal rights are necessary, then an x bit must be set. – thrig Jan 28 '16 at 21:49
  • I know that. But it seems like a bit of an oversight that rsync does not account for that possibility. After all, if you have a folder with hundreds of directories and users modifying them, how are you to know for sure what permissions they will set? – Ulukai Jan 28 '16 at 23:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.