MacOS X Rsync Server

lists lists at
Thu Feb 20 00:11:16 EST 2003

This version I'm using is actually built from fink.  Here's the man 

      #include <sys/param.h>
      #include <unistd.h>

      setgroups(int ngroups, const gid_t *gidset);

      Setgroups() sets the group access list of the current user process
      according to the array gidset.  The parameter ngroups indicates 
the num-
      ber of entries in the array and must be no more than {NGROUPS_MAX}.

      Only the super-user may set new groups.

      A 0 value is returned on success, -1 on error, with an error code 
      in errno.

      The setgroups() call will fail if:

      [EINVAL]           The value of ngroups is greater than 

      [EPERM]            The caller is not the super-user.

      [EFAULT]           The address specified for gidset is outside the 
                         cess address space.

On Wednesday, February 19, 2003, at 07:37  AM, jw schultz wrote:

> On Wed, Feb 19, 2003 at 06:50:59AM -0500, lists wrote:
>> The first two lines are the daemon stopping/starting:
>> Feb 19 06:48:11 x rsyncd[25661]: rsync error: received SIGUSR1 or
>> SIGINT (code 20) at rsync.c(280)
>> Feb 19 06:48:18 x rsyncd[29518]: rsyncd version 2.5.5 starting,
>> listening on port 873
>> Feb 19 11:48:26 x rsyncd[29520]: setgroups failed: Invalid argument
>> On Wednesday, February 19, 2003, at 06:39  AM, jw schultz wrote:
>>> On Wed, Feb 19, 2003 at 12:28:58AM -0500, lists wrote:
>>>> I am trying to set up a MacOS X rsync server and am not having much
>>>> success at the moment.  I'm able to see the "share" alright, but 
>>>> here
>>>> is what I get when I actually try to copy anything to the server:
>>>> #rsync -vz /Users/myhome localhost::backup
>>>> @ERROR: setgroups failed
>>>> rsync: connection unexpectedly closed (37 bytes read so far)
>>>> rsync error: error in rsync protocol data stream (code 12) at
>>>> io.c(150)
>>>> I get the same result on any linux server I try this from as well.
>>>> My simple trial rsyncd.conf is:
>>>> [backup]
>>>>   path = /Volumes/Backup
>>>>   comment = Backup Directory for OS X
>>>>   read only = false
>>>> Any thoughts as to why this is happening?
>>> OSX has a problem with zeroing supplemental groups?
>>> Start by looking in the daemon log (probably going to
>>> syslogd) and see what the errno is.  Frankly it should be
>>> almost impossible to have this error if autoconf is getting
>>> it right.
> It would seem that OS X does indeed have a problem zeroing
> the supplimental groups.  Configure is only testing for the
> existance of setgroups().  What does the setgroups(2)
> manpage on OS X say?  The call is setgroups(0, NULL).
> If you built rsync yourself you could work around the problem
> by editing config.h and changing
> 	#define HAVE_SETGROUPS 1
> to
> 	#define HAVE_SETGROUPS 0
> and rebuilding.
> This workaround could cause some problems if root has any
> suplimental group memberships.  We still should identify why
> OS X is having this problem so it can be resolved.
> -- 
> ________________________________________________________________
> 	J.W. Schultz            Pegasystems Technologies
> 	email address:		jw at
> 		Remember Cernan and Schmitt
> -- 
> To unsubscribe or change options: 
> Before posting, read: 

More information about the rsync mailing list