43d4bbbdb24f3d197486a3fedf0b7ea9a6791e20
After removing a volume, free_image tries to remove the parent directory, so that no empty per-guest directories are left behind once all images of a guest are gone. This was done unconditionally, so deleting the last ISO, container template, snippet or import file also removed the shared content directory like 'snippets' or 'template/iso'. The directory gets re-created shortly after by pvestatd, but as root:root with default permissions, losing any ownership or mode that the admin set up, for example to allow a non-root user to upload snippets. Only clean up the parent directory for guest images, which are the only volumes stored in per-guest directories. Signed-off-by: Michal Fox <me@dualfroz.com>
Description
My contributions to proxmox-git/pve-storage: 8 commits
101 KiB
0 Stars
1 Watchers
0 Forks
Languages
Perl
100%