How does rsync (in Cygwin) decide what sharing permissions to apply to a copied file?

0

I have an XP machine with Cygwin installed. Every night my Android phone connects to rsync on the PC and backs up my phone's pictures. This process is working smoothly, and has been for over a year.

I recently got a second PC, and wanted to backup the pics to the second PC as well. I shared the backup directory in Windows on the first PC, and copied them over to the new PC just fine. When I go to repeat the process however, any NEW files in the first PC (files which were copied via rsync the night before) don't seem to have "everyone" access in the sharing settings. If I want to copy them, it seems like I have to unshare the folder and reshare it to reapply the security settings to all the files in the folder.

Is there some way I can ensure that rsync copies the files into the shared folder with the proper settings, so the second PC can read them?

Thanks!

loneboat

Posted 2013-02-02T16:40:06.097

Reputation: 489

This issue probably won't be solved by changing anything on the rsync side: it's a cygwin issue. rsync runs in an emulated POSIX environment and it will faithfully copy the POSIX ownership and permission attributes from the source file (on Android) to the destination file (if you use either rsync's -a option or one or more of -ogp). How those permissions translate to MS Windows permissions is all up to cygwin. – Celada – 2013-02-02T18:59:54.570

Or instead, if you don't care about faithfully syncing the permissions between Android and the backup, you could make sure to omit -a and/or -p from rsync's options, run with a umask at least as permissive as 022, and hope cygwin maps the resulting permissions to something that is world-readable. – Celada – 2013-02-02T19:00:40.407

No answers