Hi, As far as I can tell, after version 2.6.4, the "--daemon" and "--temp-dir" options are not compatible anymore. Previous versions allow this. We use this heavily at my site. Is this an intentional change or bug? My command to start the daemon is this: /usr/local/bin/rsync --temp-dir=/.rsyncd-spool --daemon Thanks, -Eddie _______________________________________________ Join Excite! - http://www.excite.com The most personalized portal on the Web!
On Mon, Aug 29, 2005 at 07:42:57PM -0400, Eddie Anzalone wrote:> As far as I can tell, after version 2.6.4, the "--daemon" and > "--temp-dir" options are not compatible anymore.Yes. There were some problems with users trying to give client options to a daemon starting up that could really mess rsync up, so I made rsync only allow know-to-be OK daemon options in conjunction with --daemon. I guess I just hadn't stopped to consider that --temp-dir might be useful as a daemon option. Are you expecting the option to specify a value relative to the module's path? Or should the person who started up the daemon be able to specify an absolute path (when used in conjunction with "use chroot = no")? Attached is a one-line patch that enables --temp-dir in daemon mode. The option is still santitized relative to the module's root. It would be simple to make only a client-specified value respect this non-chroot sanitizing, but I'm thinking that it would be best to make rsync's behavior the same regardless of the setting of "use chroot". Note also that the user can still override this by specifying their own --temp-dir option. ..wayne.. -------------- next part -------------- --- options.c 30 Aug 2005 02:59:30 -0000 1.274 +++ options.c 30 Aug 2005 03:10:44 -0000 @@ -530,6 +530,7 @@ static struct poptOption long_daemon_opt {"port", 0, POPT_ARG_INT, &rsync_port, 0, 0, 0 }, {"protocol", 0, POPT_ARG_INT, &protocol_version, 0, 0, 0 }, {"server", 0, POPT_ARG_NONE, &am_server, 0, 0, 0 }, + {"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 }, {"verbose", 'v', POPT_ARG_NONE, 0, 'v', 0, 0 }, {"help", 'h', POPT_ARG_NONE, 0, 'h', 0, 0 }, {0,0,0,0, 0, 0, 0}
Wayne, We use the "use chroot = yes" setting in the /etc/rsyncd.conf at my workplace, so the daemon (in ver 2.6.3) uses the directory relative to the module's path. I don't think it's wise allowing the "--daemon" to accept absolute paths from the client, and should probably be dictated all within the server side of the code. It seems more intuitive to specify this setting via the conf file, rather than on command line. I would actually vote to have all daemon options specified in the conf file. I'd be happy to move it out of the init script. Also, seems it would help to simplify whether/when the directory's relative to the chroot or absolute, if the settings are both in the conf file. Uhm, or maybe have the directory setting absolute if it starts with a bang or something?? We have deployed a cluster of rsync daemons NFS mounting shared storage, so a new option to use absolute path (to local/private storage) may actually help to avoid the small chance of conflict should two rsync servers attempt to work on the same file at the same moment?.. That hasn't happened to us yet, but we use the "#$%^&*" out of rsync. We're averaging 85k newly added jpeg files syncronized daily between two remote active/active sites. Thanks for the patch, we were wondering if that was all that was involved... But, it would be super if you would roll this into the codebase, rather than a custom patch (from an admin's perspective anyways :-) Thanks again! -Eddie --- On Mon 08/29, Wayne Davison < wayned@samba.org > wrote: From: Wayne Davison [mailto: wayned@samba.org] To: ejne@excite.com Cc: rsync@lists.samba.org Date: Mon, 29 Aug 2005 20:25:20 -0700 Subject: Re: are --temp-dir and --daemon mode compatible options On Mon, Aug 29, 2005 at 07:42:57PM -0400, Eddie Anzalone wrote:>> As far as I can tell, after version 2.6.4, the "--daemon" and >> "--temp-dir" options are not compatible anymore.> > Yes. There were some problems with users trying to give client > options to a daemon starting up that could really mess rsync > up, so I made rsync only allow know-to-be OK daemon options in > conjunction with --daemon. I guess I just hadn't stopped to > consider that --temp-dir might be useful as a daemon option. > Are you expecting the option to specify a value relative to the > module's path? Or should the person who started up the daemon > be able to specify an absolute path (when used in conjunction > with "use chroot = no")? > > Attached is a one-line patch that enables --temp-dir in daemon > mode. The option is still santitized relative to the module's > root. It would be simple to make only a client-specified value > respect this non-chroot sanitizing, but I'm thinking that it > would be best to make rsync's behavior the same regardless of > the setting of "use chroot". Note also that the user can still > override this by specifying their own --temp-dir option. > ..wayne.. > > Attachment: Attachment (0.57KB) >_______________________________________________ Join Excite! - http://www.excite.com The most personalized portal on the Web!