jhurd8025
2007-Jul-24 12:23 UTC
File/Folder Ownership - Cygwin/Rsync - Is it possible to get around rsync taking file ownership?
Case point: 2 Servers (both with Windows Server 2k3 & cygwin). Running ssh on the destination server. Problem: The rsync user will take ownership over any files copied over from the source server. This takes ownership away from the administrators group, thus disallowing inherited permissions. Is there any way around not taking ownership away from the administrators group and giving it to the rsync user? I've seen this done with the cwRsync package, but unfortunately our security group will allow the base cygwin packages. Any help is much appreciated! -- View this message in context: http://www.nabble.com/File-Folder-Ownership---Cygwin-Rsync---Is-it-possible-to-get-around-rsync-taking-file-ownership--tf4135581.html#a11761819 Sent from the Samba - rsync mailing list archive at Nabble.com.
jhurd8025
2007-Jul-25 16:20 UTC
File/Folder Ownership - Cygwin/Rsync - Is it possible to get around rsync taking file ownership?
Thanks for the options, tried the below options with no luck. This happened to me but im on unix platform. The options may still work for you. -PaRz --quiet --stats --delete --delete-excluded --copy-unsafe-links --numeric-ids The numeric ids option keeps the permissions the same on unix as they are on the source machine. jhurd8025 wrote:> > Case point: 2 Servers (both with Windows Server 2k3 & cygwin). Running ssh > on the destination server. > > Problem: The rsync user will take ownership over any files copied over > from the source server. This takes ownership away from the administrators > group, thus disallowing inherited permissions. > > Is there any way around not taking ownership away from the administrators > group and giving it to the rsync user? > > I've seen this done with the cwRsync package, but unfortunately our > security group will allow the base cygwin packages. Any help is much > appreciated! > >-- View this message in context: http://www.nabble.com/File-Folder-Ownership---Cygwin-Rsync---Is-it-possible-to-get-around-rsync-taking-file-ownership--tf4135581.html#a11785984 Sent from the Samba - rsync mailing list archive at Nabble.com.
Matt McCutchen
2007-Jul-25 17:46 UTC
File/Folder Ownership - Cygwin/Rsync - Is it possible to get around rsync taking file ownership?
On 7/24/07, jhurd8025 <texasjhurd@yahoo.com> wrote:> > Case point: 2 Servers (both with Windows Server 2k3 & cygwin). Running ssh on > the destination server. > > Problem: The rsync user will take ownership over any files copied over from > the source server. This takes ownership away from the administrators group, > thus disallowing inherited permissions. > > Is there any way around not taking ownership away from the administrators > group and giving it to the rsync user?If you are telling rsync to preserve ownership by passing -og or -a, try turning ownership preservation off by removing the -og or putting --no-o --no-g after the -a. Also try with the environment variable CYGWIN set to ntsec and try with it set to nontsec. One of these combinations is likely to do what you want. Matt
Matt McCutchen
2007-Jul-25 20:19 UTC
File/Folder Ownership - Cygwin/Rsync - Is it possible to get around rsync taking file ownership?
On 7/24/07, jhurd8025 <texasjhurd@yahoo.com> wrote:> This takes ownership away from the administrators group, > thus disallowing inherited permissions.I bet there's some way to achieve the effect you want even without the administrators group owning the files. How exactly are the inherited permissions being "disallowed"? Do they apply to "CREATOR OWNER"? If so, just change them to apply to Administrators. Is rsync clearing the flag that causes files to inherit permissions from their parents, or is it creating entries of its own that override the inherited ones? If so, I suspect that setting CYGWIN=nontsec on the receiving rsync (if it's remote, pass --rsync-path='CYGWIN=nontsec rsync' to the local rsync) may stop both of these behaviors, even if it does not fix the file ownership. The page http://www.itefix.no/phpws/index.php?module=faq&FAQ_op=view&FAQ_id=12 supports my suspicion. Matt