We will check on every start of pveproxy if the logdir are available. If not we make a new one and give www-data permission to this dir.
The reason for this is, if someone remove the directory /var/log/pveproxy pveproxy can't access the log. This permit the user to use the GUI after a reboot or a restart of the service. --- bin/pveproxy | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/pveproxy b/bin/pveproxy index 20e8f2a..6a624a8 100755 --- a/bin/pveproxy +++ b/bin/pveproxy @@ -19,6 +19,14 @@ $SIG{'__WARN__'} = sub { $@ = $err; }; +my $log = "/var/log/pveproxy"; + +if (!-d $log) { + mkdir $log; + my (undef, undef, $uid, $gid) = getpwnam('www-data'); + chown $uid, $gid, $log; +} + my $prepare = sub { my $rundir="/var/run/pveproxy"; if (mkdir($rundir, 0700)) { # only works at first start if we are root) -- 2.1.4 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel