On Tue, 20 Mar 2001, Gilles Detillieux wrote:
> Date: Tue, 20 Mar 2001 16:18:05 -0600 (CST)
> From: Gilles Detillieux <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Cc: Geoff Hutchison <[EMAIL PROTECTED]>,
> Gilles Detillieux <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED]
> Subject: Re: [htdig-dev] Command line error in ExternalParser.cc backport from
>3.2.0b3 to 3.1.5
>
> According to Joe R. Jah:
> > On Sun, 18 Mar 2001, Geoff Hutchison wrote:
> > > At 11:13 AM -0800 3/18/01, Joe R. Jah wrote:
> > > >Documents that need external parser don't get indexed when rundig from the
> > > >command prompt;-/ Not really that important because I always rundig from
> > > >cron; just an FYI;)
> > >
> > > And when you do this, it's running as root? I'm assuming this is a
> > > permission problem, but it's helpful to clarify.
> >
> > No, it never runs as root; in both cases, cron and command line, it runs
> > as user jjah, which has full access to the relevant files and directories.
> > It has always run like this without a problem until yesterday when I
> > applied ExternalParser.1 patch.
>
> I suspect a permission problem. The mode should always be specified when
> O_CREAT is in the flags to open(). Try changing the two open calls in the
> patch (or in the ExternalParser.cc source) from:
>
> +#ifdef O_BINARY
> + fd = open((char*)path, O_WRONLY|O_CREAT|O_EXCL|O_BINARY);
> +#else
> + fd = open((char*)path, O_WRONLY|O_CREAT|O_EXCL);
> +#endif
>
> to:
>
> +#ifdef O_BINARY
> + fd = open((char*)path, O_WRONLY|O_CREAT|O_EXCL|O_BINARY, 0600);
> +#else
> + fd = open((char*)path, O_WRONLY|O_CREAT|O_EXCL, 0600);
> +#endif
That solved the problem. I also placed it in the patch archive as
ExternalParser.2.
Regards,
Joe
--
_/ _/_/_/ _/ ____________ __o
_/ _/ _/ _/ ______________ _-\<,_
_/ _/ _/_/_/ _/ _/ ......(_)/ (_)
_/_/ oe _/ _/. _/_/ ah [EMAIL PROTECTED]
_______________________________________________
htdig-dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/htdig-dev