php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26989 logfile ownership as root on extension loading failure
Submitted: 2004-01-21 06:24 UTC Modified: 2004-01-21 11:21 UTC
From: david dot morel at amakuru dot net Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.3.4 OS: Linux (homebrew)
Private report: No CVE-ID: None
 [2004-01-21 06:24 UTC] david dot morel at amakuru dot net
Description:
------------
When using a logfile to record errors, if the logfile doesn't yet exist, and if an extension cannot be loaded properly, the startup message will be written in this newly created file as the owner of the top webserver process, root.
So subsequent tries by child processes to write in this file fail and no error is recorded

I guess the same would apply to any load-time source of error.

Nice thing would be that the logging facility checks the euid and see if it is different from the one the server is supposed to run his childs with (IMHO).



Reproduce code:
---------------
1) set log errors to true in php.ini
2) in extensions, add a bogus filename
3) delete previous error log
4) launch webserver server
5) extension loading failure appears in log, but child processes can't append anything.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-21 11:21 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This is to be expected. 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jun 05 13:01:36 2024 UTC