diff options
Diffstat (limited to 'etc/inc')
-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"; |