From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 0FB6F1FF0B1 for ; Fri, 09 Oct 2026 02:46:38 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id C9A85214DA; Fri, 09 Oct 2026 02:46:36 +0200 (CEST) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com, Michal Fox Subject: applied: [PATCH storage] fix #6969: plugin: keep content directory when freeing its last file Date: Fri, 9 Oct 2026 02:46:26 +0200 Message-ID: <179150678419.2472338.2377678236832983349.b4-ty@b4> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260926093257.7-1-me@dualfroz.com> References: <20260926093257.7-1-me@dualfroz.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1791506792603 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.601 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: INXLVTFXNMQ6OOM4D4SO4YA62BQ3TPI7 X-Message-ID-Hash: INXLVTFXNMQ6OOM4D4SO4YA62BQ3TPI7 X-MailFrom: t.lamprecht@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Sat, 26 Sep 2026 09:32:57 +0000, Michal Fox wrote: > 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. > > [...] Applied, thanks! [1/1] fix #6969: plugin: keep content directory when freeing its last file https://git.proxmox.com/?p=pve-storage.git;a=commitdiff;h=c10faa69723a824ed52837ad8d185c20bc472020