Re: rsync 2.5.5 and Mac OS X

2002-07-01 Thread Dave Dykstra

I compile rsync on Mac OSX (not sure of the osx version, but uname -a
says it's darwin 5.5) but haven't tried running as a daemon.  I suggest
that you try to debug it further.  setgroups() is only called one place,
in clientserver.c, with parameters setgroups(0, NULL), and only if
the define HAVE_SETGROUPS is set.  This call was a relatively recent
security fix addition to rsync.  The OSX setgroups man page says that the
EINVAL error is only supposed to occur if the first parameter is greater
than NGROUPS_MAX.  Apparently it is also reporting that error if the first
parameter is zero.

- Dave Dykstra


On Thu, Jun 27, 2002 at 02:51:40PM -0600, [EMAIL PROTECTED] wrote:
> I've got mine setup in inetd.conf to be executed on a per-call request
> of port 873 as written in the man pages. The advantage of using this
> method, is that when the client is done and disconnects, the daemon
> quits, thereby freeing up resources that it was using. Word of warning
> though if you want to try this route.. you need to add an rsync tcp
> entry for port 873 into Services with the NetInfo manager in addition to
> editing the /etc/inetd.conf file.  You'll have to restart to get any
> changes to inetd.conf take effect as 'killall -HUP inetd' has no effect.
> 
> When run in the manner above, it is started up as the root user (as
> specified in inetd.conf).
> 
> - Original Message -
> From: Catalino Cuadrado <[EMAIL PROTECTED]>
> Date: Thursday, June 27, 2002 2:19 pm
> Subject: Re: rsync digest, Vol 1 #778 - 11 msgs
> 
> > I haven't gotten it to work successfully, I'm still struggling 
> > with the
> > same setgroups error that you are. However, I can tell you what I have
> > tried. So far I have rsync configured to run in --daemon mode 
> > using the
> > command: sudo rsync --daemon I can prompt it for a list of 
> > modules, but
> > when I go to copy a module, I get the error @ERROR: setgroups failed.
> > I can copy locally, from one HD to another, but I can't get it to copy
> > over the network, even using the sudo rsync ipaddress:/Filename / 
> > method.So it's been kind of aggrivating. I'm thinking it has to do 
> > with the fact
> > that rsync needs to be run locally, and you're running it from a 
> > remoteserver... If there's a way to trick the system into thinking 
> > that the
> > rsync daemon is running as root on the local machine, that would 
> > be ideal.
> > Unfortunately, I don't know enough about the UNIX side of things 
> > to get
> > that far.
> > -Tito
> > 
> > > Message: 5
> > > Date: Thu, 27 Jun 2002 10:08:00 -0600
> > > From: [EMAIL PROTECTED]
> > > Subject: rsync 2.5.5 and Mac OS X
> > > To: [EMAIL PROTECTED]
> > > Reply-To: [EMAIL PROTECTED]
> > >
> > > Greetings,
> > >
> > > Has anyone successfully compiled rsync 2.5.5 under Mac OS X (not
> > > Server), and actually have it work fully?
> > >
> > > I'm in a position where I'm trying to setup an automated nightly 
> > remote> backup between and Cobalt Raq4 (running a variant of 
> > Redhat Linux) and a
> > > Mac running OS X 10.1.5 with the latest development tools 
> > installed.  As
> > > has been pointed out previously on the list, one has to 
> > ./configure with
> > > the --disable-ipv6 flag to even get it to compile at all.  However
> > > there's further issues when trying to back up to the Mac running 
> > rsync> in inetd --daemon mode.
> > >
> > > When I issue the following command:
> > >
> > > ---
> > > rsync -avz /home [EMAIL PROTECTED]::raqbackup
> > > ---
> > >
> > > I get the following error:
> > >
> > > ---
> > > @ERROR: setgroups failed
> > > rsync: connection unexpectedly closed (79 bytes read so far)
> > > rsync error: error in rsync protocol data stream (code 12) at 
> > io.c(150)> ---
> > >
> > > On the server end, rsyncd.log shows the following:
> > >
> > > ---
> > > 2002/06/27 09:50:03 [19768] setgroups failed: Invalid argument
> > > ---
> > >
> > > I've had luck running rsync 2.5.2 running through ssh, but 
> > because I
> > > can't get it to retain the user/group ownership settings it's 
> > completely> useless as 'mirrored' backup unless I spent the next 
> > month hand
> > > restoring the file ownership's by hand.  The man pages noted this
> > > limitation, unless running as super-user, whic

Re: rsync 2.5.5 and Mac OS X

2002-06-27 Thread grbear

I've got mine setup in inetd.conf to be executed on a per-call request
of port 873 as written in the man pages. The advantage of using this
method, is that when the client is done and disconnects, the daemon
quits, thereby freeing up resources that it was using. Word of warning
though if you want to try this route.. you need to add an rsync tcp
entry for port 873 into Services with the NetInfo manager in addition to
editing the /etc/inetd.conf file.  You'll have to restart to get any
changes to inetd.conf take effect as 'killall -HUP inetd' has no effect.

When run in the manner above, it is started up as the root user (as
specified in inetd.conf).

- Original Message -
From: Catalino Cuadrado <[EMAIL PROTECTED]>
Date: Thursday, June 27, 2002 2:19 pm
Subject: Re: rsync digest, Vol 1 #778 - 11 msgs

> I haven't gotten it to work successfully, I'm still struggling 
> with the
> same setgroups error that you are. However, I can tell you what I have
> tried. So far I have rsync configured to run in --daemon mode 
> using the
> command: sudo rsync --daemon I can prompt it for a list of 
> modules, but
> when I go to copy a module, I get the error @ERROR: setgroups failed.
> I can copy locally, from one HD to another, but I can't get it to copy
> over the network, even using the sudo rsync ipaddress:/Filename / 
> method.So it's been kind of aggrivating. I'm thinking it has to do 
> with the fact
> that rsync needs to be run locally, and you're running it from a 
> remoteserver... If there's a way to trick the system into thinking 
> that the
> rsync daemon is running as root on the local machine, that would 
> be ideal.
> Unfortunately, I don't know enough about the UNIX side of things 
> to get
> that far.
> -Tito
> 
> > Message: 5
> > Date: Thu, 27 Jun 2002 10:08:00 -0600
> > From: [EMAIL PROTECTED]
> > Subject: rsync 2.5.5 and Mac OS X
> > To: [EMAIL PROTECTED]
> > Reply-To: [EMAIL PROTECTED]
> >
> > Greetings,
> >
> > Has anyone successfully compiled rsync 2.5.5 under Mac OS X (not
> > Server), and actually have it work fully?
> >
> > I'm in a position where I'm trying to setup an automated nightly 
> remote> backup between and Cobalt Raq4 (running a variant of 
> Redhat Linux) and a
> > Mac running OS X 10.1.5 with the latest development tools 
> installed.  As
> > has been pointed out previously on the list, one has to 
> ./configure with
> > the --disable-ipv6 flag to even get it to compile at all.  However
> > there's further issues when trying to back up to the Mac running 
> rsync> in inetd --daemon mode.
> >
> > When I issue the following command:
> >
> > ---
> > rsync -avz /home [EMAIL PROTECTED]::raqbackup
> > ---
> >
> > I get the following error:
> >
> > ---
> > @ERROR: setgroups failed
> > rsync: connection unexpectedly closed (79 bytes read so far)
> > rsync error: error in rsync protocol data stream (code 12) at 
> io.c(150)> ---
> >
> > On the server end, rsyncd.log shows the following:
> >
> > ---
> > 2002/06/27 09:50:03 [19768] setgroups failed: Invalid argument
> > ---
> >
> > I've had luck running rsync 2.5.2 running through ssh, but 
> because I
> > can't get it to retain the user/group ownership settings it's 
> completely> useless as 'mirrored' backup unless I spent the next 
> month hand
> > restoring the file ownership's by hand.  The man pages noted this
> > limitation, unless running as super-user, which I haven't been 
> able to
> > get to work (use chroot=yes in rsyncd.conf doesn't seem to do it)
> >
> > If anyone has been able to get Mac OS X 10.1.5 running as a 
> rsync server
> > in such a fashion, I'd really appreciate hearing from you.
> >
> > For debuging purposes, my current rsyncd.conf is:
> >
> > ---
> > use chroot = yes
> > max connections = 1
> > syslog facility = local5
> > motd file = /etc/rsyncd.motd
> > log file = /var/log/rsyncd.log
> > pid file = /var/run/rsyncd.pid
> > lock file = /var/run/rsync.lock
> >
> > [raqbackup]
> > path = /Volumes/Eeyore/RaqBackup
> > comment = Raq Backup Directory
> > auth users = xxx
> > secrets file = /etc/rsyncd.secrets
> > ---
> >
> > and the destination directory is set as:
> >
> > ---
> > drwxrwxrwx2 nobody  nobody  24 Jun 26 22:09 RaqBackup
> > ---



-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html



rsync 2.5.5 and Mac OS X

2002-06-27 Thread grbear

Greetings,

Has anyone successfully compiled rsync 2.5.5 under Mac OS X (not
Server), and actually have it work fully?

I'm in a position where I'm trying to setup an automated nightly remote
backup between and Cobalt Raq4 (running a variant of Redhat Linux) and a
Mac running OS X 10.1.5 with the latest development tools installed.  As
has been pointed out previously on the list, one has to ./configure with
the --disable-ipv6 flag to even get it to compile at all.  However
there's further issues when trying to back up to the Mac running rsync
in inetd --daemon mode.

When I issue the following command:

---
rsync -avz /home [EMAIL PROTECTED]::raqbackup
---

I get the following error:

---
@ERROR: setgroups failed
rsync: connection unexpectedly closed (79 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(150)
---

On the server end, rsyncd.log shows the following:

---
2002/06/27 09:50:03 [19768] setgroups failed: Invalid argument
---

I've had luck running rsync 2.5.2 running through ssh, but because I
can't get it to retain the user/group ownership settings it's completely
useless as 'mirrored' backup unless I spent the next month hand
restoring the file ownership's by hand.  The man pages noted this
limitation, unless running as super-user, which I haven't been able to
get to work (use chroot=yes in rsyncd.conf doesn't seem to do it)

If anyone has been able to get Mac OS X 10.1.5 running as a rsync server
in such a fashion, I'd really appreciate hearing from you.

For debuging purposes, my current rsyncd.conf is:

---
use chroot = yes
max connections = 1
syslog facility = local5
motd file = /etc/rsyncd.motd
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock

[raqbackup]
path = /Volumes/Eeyore/RaqBackup
comment = Raq Backup Directory
auth users = xxx
secrets file = /etc/rsyncd.secrets
---

and the destination directory is set as:

---
drwxrwxrwx2 nobody  nobody  24 Jun 26 22:09 RaqBackup
---


Thank you for any assistance anyone can offer.

Cheers!


-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html