Is there a way to force rsync to set a specific owner and group on destination files? I have managed to get the permissions set up the way I want, but the owner and group are still defaulting to a numeric id instead of the correct owner and group. I suppose I could add a manual "chown -R owner:group" at the end of my script, but was curious if rsync had this built in. Or maybe there is some ACL setting that will force the right owner and group on all new files.
thanks
Sean
On Fri, May 9, 2008 at 10:38 AM, Sean Carolan scarolan@gmail.com wrote:
Is there a way to force rsync to set a specific owner and group on destination files? I have managed to get the permissions set up the way I want, but the owner and group are still defaulting to a numeric id instead of the correct owner and group.
Do your user and group names on both your source and destination systems have matching numeric values?
Linux/UNIX systems carry the numeric values and look up the text values in /etc/passwd and /etc/group for display. If you are seeing numeric values, that would imply there are no matching entries in those files.
If you adjust your numeric values for the owner and group to match on source and destination systems, your systems will match up.
Brett
Do your user and group names on both your source and destination systems have matching numeric values?
No. The source system is a Windows machine running cygwin-rsyncd.
Linux/UNIX systems carry the numeric values and look up the text values in /etc/passwd and /etc/group for display. If you are seeing numeric values, that would imply there are no matching entries in those files.
Yea, i figured as much. I was hoping that rsync could manually change the ownership, or that perhaps there was some acl setting that could be used to say "All files that get created in this directory will always have the same owner and group."
If you adjust your numeric values for the owner and group to match on source and destination systems, your systems will match up.
No can do. As mentioned above, the source system is a 'doze box.
On Fri, May 9, 2008 at 9:46 AM, Sean Carolan scarolan@gmail.com wrote:
Do your user and group names on both your source and destination systems have matching numeric values?
No. The source system is a Windows machine running cygwin-rsyncd.
Linux/UNIX systems carry the numeric values and look up the text values in /etc/passwd and /etc/group for display. If you are seeing numeric values, that would imply there are no matching entries in those files.
Yea, i figured as much. I was hoping that rsync could manually change the ownership, or that perhaps there was some acl setting that could be used to say "All files that get created in this directory will always have the same owner and group."
If you adjust your numeric values for the owner and group to match on source and destination systems, your systems will match up.
No can do. As mentioned above, the source system is a 'doze box.
What rsync options are you using? rsync has options to preserve owner and group, if you exclude those options, then won't the files assume the user and group of the user account on the destination machine? I haven't tested this, but it looks good on paper.
What rsync options are you using? rsync has options to preserve owner and group, if you exclude those options, then won't the files assume the user and group of the user account on the destination machine? I haven't tested this, but it looks good on paper.
Currently the script runs as root, but I can probably re-configure this to run as a specific user. This seems like the path of least resistance.