feature: ignore web server log files ownership in validate (#6943)

This commit is contained in:
Tony Murray
2017-07-03 16:17:07 -05:00
committed by Neil Lathwood
parent afcc2b5e2d
commit 74e6c3edf5

View File

@@ -143,8 +143,11 @@ if (isset($config['user'])) {
$find_result = rtrim(`find $tmp_dir \! -user $tmp_user`);
if (!empty($find_result)) {
// This isn't just the log directory, let's print the list to the user
$files = explode(PHP_EOL, $find_result);
if (is_array($files)) {
$files = array_diff(explode(PHP_EOL, $find_result), array(
"$tmp_dir/logs/error_log",
"$tmp_dir/logs/access_log",
));
if (!empty($files)) {
print_fail(
"We have found some files that are owned by a different user than $tmp_user, " .
'this will stop you updating automatically and / or rrd files being updated causing graphs to fail.',