]> git.proxmox.com Git - pmg-api.git/blobdiff - PMG/UserConfig.pm
PMG/Config.pm: allow single address setups
[pmg-api.git] / PMG / UserConfig.pm
index 2ee088ba558f4c37bb8f6d35cd1002d47942ce90..f1134e4aac9e8ee7a7b62f8f47d03b1f54ba0123 100644 (file)
@@ -1,6 +1,5 @@
 package PMG::UserConfig;
 
-
 use strict;
 use warnings;
 use Data::Dumper;
@@ -270,7 +269,9 @@ sub write_user_conf {
        $raw .= $line . "\n";
     }
 
-    chmod(0600, $fh);
+    my $gid = getgrnam('www-data');
+    chown(0, $gid, $fh);
+    chmod(0640, $fh);
 
     PVE::Tools::safe_print($filename, $fh, $raw);
 }