diff options
author | jim-p <jimp@pfsense.org> | 2010-08-06 08:29:27 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2010-08-06 08:30:34 -0400 |
commit | 25cca20b4b4adbfedeb27a21b7b80f0f19ec89b3 (patch) | |
tree | 0ab47703be7e03414d00a6b338dbf11130ae7298 | |
parent | 1beafceb73be3362da8d9d1c3f6e89c4dfc80607 (diff) | |
download | pfsense-25cca20b4b4adbfedeb27a21b7b80f0f19ec89b3.zip pfsense-25cca20b4b4adbfedeb27a21b7b80f0f19ec89b3.tar.gz |
chown the RRD path on every call, not just when initially creating the RRD directory. Also, chown the resulting rrd files.
-rw-r--r-- | etc/inc/rrd.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/inc/rrd.inc b/etc/inc/rrd.inc index 4881706..96981da 100644 --- a/etc/inc/rrd.inc +++ b/etc/inc/rrd.inc @@ -228,8 +228,8 @@ function enable_rrd_graphing() { /* create directory if needed */ if (!is_dir($rrddbpath)) { mkdir($rrddbpath, 0775); - chown($rrddbpath, "nobody"); } + chown($rrddbpath, "nobody"); if ($g['booting']) { if ($g['platform'] != "pfSense") { @@ -680,6 +680,11 @@ function enable_rrd_graphing() { kill_traffic_collector(); } + $databases = glob("{$rrddbpath}/*.rrd"); + foreach($databases as $database) { + chown($database, "nobody"); + } + if($g['booting']) echo "done.\n"; |