($path, $ownervm, $vtype) = PVE::Storage::path($storecfg, $volid);
if ($vtype eq 'iso' || $vtype eq 'vztmpl') {
# we simply allow access
- } elsif (!$ownervm || ($ownervm != $vmid)) {
+ } elsif (defined($ownervm) && defined($vmid) && ($ownervm == $vmid)) {
+ # we are owner - allow access
+ } elsif ($vtype eq 'backup' && $ownervm) {
+ $self->check($user, "/storage/$sid", ['Datastore.AllocateSpace']);
+ $self->check($user, "/vms/$ownervm", ['VM.Backup']);
+ } else {
# allow if we are Datastore administrator
$self->check($user, "/storage/$sid", ['Datastore.Allocate']);
}
+libpve-access-control (1.0-26) unstable; urgency=low
+
+ * check_volume_access: fix access permissions for backup files
+
+ -- Proxmox Support Team <support@proxmox.com> Thu, 28 Feb 2013 10:00:14 +0100
+
libpve-access-control (1.0-25) unstable; urgency=low
* add VM.Snapshot permission