Message ID | 1427405998-13038-5-git-send-email-greearb@candelatech.com |
---|---|
State | Changes Requested |
Headers | show |
On Thu, Mar 26, 2015 at 05:39:51PM -0400, greearb@candelatech.com wrote: > Add note so that the user has a chance to find it more easily. > diff --git a/hs20/server/www/spp.php b/hs20/server/www/spp.php > +// Note that systemd + apache may run under chroot, and so your log file will > +// be in some hard-to-find place like: > +// /tmp/systemd-httpd.service-XqgPdBa/tmp/hs20_spp_server.log > $last = exec("$osu_root/spp/hs20_spp_server -r$osu_root -f/tmp/hs20_spp_server.log", $output, $ret); I would much rather provide means for configuring the log file path in config.php.
It seems that apache is running in some sort of chroot on my systems, so no matter what you set the log file to, it's going to be hidden off in this temp directory. We can still configure it within that chroot though if you want. Ben On 03/28/2015 02:17 AM, Jouni Malinen wrote: > On Thu, Mar 26, 2015 at 05:39:51PM -0400, greearb@candelatech.com wrote: >> Add note so that the user has a chance to find it more easily. >> diff --git a/hs20/server/www/spp.php b/hs20/server/www/spp.php >> +// Note that systemd + apache may run under chroot, and so your log file will >> +// be in some hard-to-find place like: >> +// /tmp/systemd-httpd.service-XqgPdBa/tmp/hs20_spp_server.log >> $last = exec("$osu_root/spp/hs20_spp_server -r$osu_root -f/tmp/hs20_spp_server.log", $output, $ret); > > I would much rather provide means for configuring the log file path in > config.php. >
On Sat, Mar 28, 2015 at 08:44:15AM -0700, Ben Greear wrote: > It seems that apache is running in some sort of chroot on my systems, > so no matter what you set the log file to, it's going to be hidden off > in this temp directory. > > We can still configure it within that chroot though if you want. Are you sure it is full chroot? If so, where do you have $osu_root pointing at? I'd expect this to just provide a unique /tmp. In any case, config.php is more appropriate place for including a comment about the location of the log file than spp.php.
On 03/29/2015 12:07 AM, Jouni Malinen wrote: > On Sat, Mar 28, 2015 at 08:44:15AM -0700, Ben Greear wrote: >> It seems that apache is running in some sort of chroot on my systems, >> so no matter what you set the log file to, it's going to be hidden off >> in this temp directory. >> >> We can still configure it within that chroot though if you want. > > Are you sure it is full chroot? If so, where do you have $osu_root > pointing at? I'd expect this to just provide a unique /tmp. In any case, > config.php is more appropriate place for including a comment about the > location of the log file than spp.php. It must not be full chroot since the DB files can be opened in their normal location. I can move comment to config.php as you suggest. Thanks, Ben
On Sun, Mar 29, 2015 at 10:30:01AM -0700, Ben Greear wrote: > It must not be full chroot since the DB files can be opened in their normal > location. > > I can move comment to config.php as you suggest. I would actually not even add that comment about /tmp but just replace the default for the (to be added) log file configuration variable location to be within $osu_root, i.e., outside that unique /tmp location.
diff --git a/hs20/server/www/spp.php b/hs20/server/www/spp.php index dde4434..acb4c78 100644 --- a/hs20/server/www/spp.php +++ b/hs20/server/www/spp.php @@ -100,6 +100,9 @@ putenv("HS20POST=$HTTP_RAW_POST_DATA"); $addr = $_SERVER["REMOTE_ADDR"]; putenv("HS20ADDR=$addr"); +// Note that systemd + apache may run under chroot, and so your log file will +// be in some hard-to-find place like: +// /tmp/systemd-httpd.service-XqgPdBa/tmp/hs20_spp_server.log $last = exec("$osu_root/spp/hs20_spp_server -r$osu_root -f/tmp/hs20_spp_server.log", $output, $ret); if ($ret == 2) {