It seems that even if -p (or -a, etc) are not used, permissions are still 
propagated from client to server, though not updated.  I was a bit surprised 
since the option is "preserve permissions", and permissions were preserved on 
the initial copy even without -p.

[ I am trying to rsync from Windows 7/Cygwin to (linux/unix).  Windows 7/Cygwin 
is mapping ACL-style permissions (and I didn't have full control), and yielded 
mode=0, which was propagated to the client.  Adding full control and a passwd 
entry yielded u+rwx, so that problem is solved. ]

Ex:

$ mkdir a
$ touch a/test
$ chmod go= a/test
$ rsync -r a/ b/
$ ls -l a/test b/test
-rw-------   1 vallonj  vallonj        0 Aug 13 15:03 a/test
-rw-------   1 vallonj  vallonj        0 Aug 13 15:03 b/test    # permissions 
were copied from a/test to b/test
$ chmod go+r a/test
$ rsync -r a/ b/
$ ls -l a/test b/test
-rw-r--r--   1 vallonj  vallonj        0 Aug 13 15:03 a/test
-rw-------   1 vallonj  vallonj        0 Aug 13 15:04 b/test    # without -p, 
no change
$ rsync -rp a/ b/
$ ls -l a/test b/test
-rw-r--r--   1 vallonj  vallonj        0 Aug 13 15:03 a/test
-rw-r--r--   1 vallonj  vallonj        0 Aug 13 15:04 b/test    # with -p, 
permissions were pushed
$ chmod go= a/test
$ rsync -r a/ b/
$ ls -la a/test b/test
-rw-------   1 vallonj  vallonj        0 Aug 13 15:03 a/test
-rw-r--r--   1 vallonj  vallonj        0 Aug 13 15:04 b/test   # not copied
$ rm b/test
$ rsync -r a/ b/
$ ls -la a/test b/test
-rw-------   1 vallonj  vallonj        0 Aug 13 15:03 a/test
-rw-------   1 vallonj  vallonj        0 Aug 13 15:04 b/test   # propagated 
upon create
$ rsync --version
rsync  version 3.0.7  protocol version 30
...

--
-Justin

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to