[mod-security-users] Re2: SecChrootDir and httpd.conf
Brought to you by:
victorhora,
zimmerletw
|
From: Markus J. <ml...@ze...> - 2003-09-21 13:31:10
|
Hi Thanks for the fast reply. At 18:06 +0100 20.9.2003, Ivan Ristic wrote: > How did you change it? That check is what makes it work; Apache > initialises all modules twice, and getppid returns 1 on the > second pass (and the chroot call must be made in the second > pass). I just commented it out, since I noticed that neither of the ap_log_error()s appeared in the logs. After receiving your message I removed the comment (reactivating the call to getppid()) and added a call to ap_log_error() to the top of sec_init(). These are the results: First test, no SecChrootDir in conf 0) Starting apache: >[notice] mod_security: sec_init called, getppid()=2712 >[notice] mod_security: sec_init called, getppid()=1 >[notice] Apache/2.0.47 (Unix) PHP/4.3.3 configured -- resuming >normal operations 1) Restarting apache: >[notice] SIGHUP received. Attempting to restart >[notice] mod_security: sec_init called, getppid()=1 >[notice] Apache/2.0.47 (Unix) PHP/4.3.3 configured -- resuming >normal operations which looks ok Second test, added "SecChrootDir /disk2" to conf 0) Starting apache: >[notice] mod_security: sec_init called, getppid()=2756 >[notice] mod_security: sec_init called, getppid()=2757 >[notice] Apache/2.0.47 (Unix) PHP/4.3.3 configured -- resuming >normal operations getppid() doesn' return 1 => chroot doesn't get called. 1) Restarting apache: >[notice] SIGHUP received. Attempting to restart >[notice] mod_security: sec_init called, getppid()=1 >[notice] mod_security: performed chroot, path=/disk2 >[error] (2)No such file or directory: could not create /tmp/httpd.pid >[error] httpd: could not log pid to file /tmp/httpd.pid getppid() returns 1 => chroot gets called => apache dies :( Thanks --markus |