-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Joshua Slive wrote: > On 5/30/07, ramakrishnaprasad.annasamudram@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > <ramakrishnaprasad.annasamudram@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote: >> >> >> 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: http://pengunassasin.kicks-ass.org/pgpKey.html ******* Wisdom for the day ******* * Dont rawquote - it gives * * spammers free bait! * ********************************** -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGXgI5CF9T/dUsmAgRAlfUAJ0eIomVZCdyHEY9uBL+QOZ/huLQPACfXUc8 G2mN9YqGRtXkFbaRG0WhvQM= =dbI+ -----END PGP SIGNATURE----- --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx