Default change group if not found

This commit is contained in:
Félix Suárez 2024-04-01 17:32:34 -06:00
parent 19d4d3220c
commit abb0d51de9
1 changed files with 1 additions and 0 deletions

View File

@ -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 );