John F Hall <[EMAIL PROTECTED]> writes:
> > nor did I take the "-l" flag off.)
>
> I've done some more digging and I think the "-l" flag was the problem.
>
> I've just noticed a syslog entry that I had missed: "wwwoffled[1358]:
> Cannot open log file '/var/log/wwwoffle' [Permission denied]."
>
> What appears to have happened was that wwwoffled started as root,
> created /var/log/wwwoffle as writable only by root, and then changed
> user to daemon. It and its forks then lost access to the log file,
> causing problems.
>
> The workround is dead easy: "chown daemon. /var/log/wwwoffle".
>
> Hopefully Andrew will sometime add a chown(2) call somewhere between
> opening/creating the file and the setuid call :-).
I have just done it.
-------------------- wwwoffled.c.diff --------------------
--- wwwoffled.c 2004/02/25 19:35:19 2.73
+++ wwwoffled.c 2004/07/05 08:29:13 2.74
@@ -247,6 +247,9 @@
if(uid!=-1)
seteuid(0);
+ if(log_file && (uid!=-1 || gid!=-1))
+ chown(log_file,uid,gid);
+
if(gid!=-1)
{
#if HAVE_SETGROUPS
-------------------- wwwoffled.c.diff --------------------
At the same time I have fixed a number of other related bugs. For
example if the log file could not be opened then it should have
stopped trying to write to it. This would have stopped the problem
that you were seeing, but that also wasn't working.
> Since changing the log file ownership I've seen pictures half-fill,
> pause, and then complete, and not seen any partial pictures. While I've
> only seen a small sample I am hopeful that everything will be OK now.
I am surprised that this problem only affected some of the pages that
you were trying to visit and not all of them.
--
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop [EMAIL PROTECTED]
http://www.gedanken.demon.co.uk/
WWWOFFLE users page:
http://www.gedanken.demon.co.uk/wwwoffle/version-2.8/user.html