MacOS X Rsync Server

jw schultz jw at pegasys.ws
Thu Feb 20 08:35:31 EST 2003


On Wed, Feb 19, 2003 at 08:11:16AM -0500, lists wrote:
> This version I'm using is actually built from fink.  Here's the man 
> page:
> 
> ERRORS
>      The setgroups() call will fail if:
> 
>      [EINVAL]           The value of ngroups is greater than {NGROUPS_MAX}.
> 
>      [EPERM]            The caller is not the super-user.
> 
>      [EFAULT]           The address specified for gidset is outside the pro-
>                         cess address space.

So a value of 0 is greater than NGROUPS_MAX?  That is
definitely wrong.  Either there is a link error or OSX
has a bug.  I don't know from "fink" but i'd prefer we have
corroborating reports from independent builds before
assuming the problem is OSX.

There isn't much that can be done to work around your
problem without a rebuild.  You basically have four
choices:
	Use another OS for your rsync server.
	Run your daemon as a normal user
		(no chroot, no uid/gid preservation etc).
	Don't use the rsync daemon, do the transfers via
		rsh/ssh.
	Make or otherwise get a different build of rsync.

> 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 pegasys.ws
> >
> >		Remember Cernan and Schmitt
> >-- 
> >To unsubscribe or change options: 
> >http://lists.samba.org/mailman/listinfo/rsync
> >Before posting, read: 
> >http://www.tuxedo.org/~esr/faqs/smart-questions.html
> >
> 
> -- 
> To unsubscribe or change options: 
> http://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

-- 
________________________________________________________________
	J.W. Schultz            Pegasystems Technologies
	email address:		jw at pegasys.ws

		Remember Cernan and Schmitt


More information about the rsync mailing list