httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From morgan gangwere <>
Subject Re: [users@httpd] How to store loginformation in user specified directory?
Date Wed, 30 May 2007 23:01:13 GMT
Hash: SHA1

Joshua Slive wrote:
> On 5/30/07,
> <>
>> Hi,
>> We are facing a tight problem regarding a user  requirement to store
>> logfile in user specified directory.We are getting  segmentation fault
>> when we are starting apache when we try to use a log file in  user
>> defined directory(other than logs/).
>> We used fopen(),fprintf() to write the user  specified file.This
>> always gave segmentation fault.The one option we had  regarding using
>> ErrorLog is failing since httpd.conf recognises path w.r.t  ServerRoot.
>> Did any one has done this before? [did anyone has done this before == "has anyone
done this before"-p]
>>Is this possible  ? If so please
>> suggest a way out.
> That doesn't really make any sense to me. Apache will happily write
> the access and error logs wherever you tell it, if the permissions are
> correct and there is sufficient space. Have you tried starting apache
> under strace to see what syscall is failing? Have you tried debugging
> the core dump?
> I also don't understand what you mean when you say you used
> fopen(),fprintf(). Why do you need to use these? It is apache that
> controls the log files directly.
> Finally, you should heed the warning in the docs that logs shouldn't
> be written anywhere that root does not exclusively control. Otherwise,
> whatever user controls the log directory can almost certainly gain
> root.
> Joshua.

agreed. what i _think_ (pullin things outta the air) is that theres
something running thats reading in the apache log files as they're being
written - something garunteed to segfault.

a _proper_ way to do this would be

read (or type) /path/to/logfile >> /path/to/new/log

this will read in the logfile and concatenate it to the proper place.
the only thing needed is have the permissions to the directory.

However, i may be wrong... correct me if i am

- --
Just a Thought
Morgan Gangwere

For those who want my PGP key:

******* Wisdom for the day *******
* Dont rawquote - it gives       *
*          spammers free bait!   *
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla -


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message