From abb0d51de9f4f2cb2935b82be63ce15e661b2da6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Su=C3=A1rez?= Date: Mon, 1 Apr 2024 17:32:34 -0600 Subject: [PATCH] Default change group if not found --- pandora_server/lib/PandoraFMS/Tools.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 43b7db611b..8210830ada 100755 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -612,6 +612,7 @@ sub set_file_permissions($$;$) { my $uid = getpwnam($pa_config->{'user'}); my $gid = getgrnam($pa_config->{'group'}); my $perm = $grants & (~oct($pa_config->{'umask'})); + $gid = getgrnam("www-data") if (!defined($gid)); chown $uid, $gid, $file; chmod ( $perm, $file );