[pve-devel] r5725 - pve-common/trunk/data/PVE
svn-commits at proxmox.com
svn-commits at proxmox.com
Fri Mar 18 11:19:09 CET 2011
Author: dietmar
Date: 2011-03-18 11:19:09 +0100 (Fri, 18 Mar 2011)
New Revision: 5725
Modified:
pve-common/trunk/data/PVE/Tools.pm
Log:
remove ownerid parameter
Modified: pve-common/trunk/data/PVE/Tools.pm
===================================================================
--- pve-common/trunk/data/PVE/Tools.pm 2011-03-18 09:05:26 UTC (rev 5724)
+++ pve-common/trunk/data/PVE/Tools.pm 2011-03-18 10:19:09 UTC (rev 5725)
@@ -511,16 +511,21 @@
}
sub upid_open {
- my ($upid, $ownerid) = @_;
+ my ($upid) = @_;
my ($task, $filename) = upid_decode($upid);
my $dirname = dirname($filename);
make_path($dirname);
+
+ my $wwwid = getpwnam('www-data') ||
+ die "getpwnam failed";
+
+ my $perm = 0640;
- my $outfh = IO::File->new ($filename, O_WRONLY|O_CREAT|O_EXCL) ||
+ my $outfh = IO::File->new ($filename, O_WRONLY|O_CREAT|O_EXCL, $perm) ||
die "unable to create output file '$filename' - $!\n";
- chown $ownerid, $outfh;
+ chown $wwwid, $outfh;
return $outfh;
};
More information about the pve-devel
mailing list