From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [PATCH pmg-api] d/postinst: do not error out on chown/chmod /var/spool/pmg/
Date: Mon, 22 Jun 2026 10:21:17 +0200 [thread overview]
Message-ID: <20260622082137.2431-1-s.ivanov@proxmox.com> (raw)
When /var/spool/pmg is a dedicated mountpoint on an unpriviledged
container, its `.lost+found` is not writeable by root inside the
container.
In this case - it makes sense to not cause postinst to error-out, as
the failing change of mode/ownership is not problematic.
I don't think that it's a too common setup, but as /var/spool/pmg is
one of the places which does grow with more usage (quarantined files)
having it on a separate mount-point can make sense.
I considered guarding all the changes of metadata with '|| true', but
as failing to change ownership will result in broken mail-processing
for most of the changes it seems better to fail during apt to have the
user notice the issue as early as possible.
reported in our community forum:
https://forum.proxmox.com/threads/184240/post-858302
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
debian/postinst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/debian/postinst b/debian/postinst
index ee218ab9..ce514ade 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -40,8 +40,8 @@ migrate_pmg_smtp_filter() {
printf "Adjusting group ownership of the mail spool, this might take a while\n"
# no -v: the spool can hold millions of mails
- chgrp -R pmg /var/spool/pmg
- chmod -R g+w /var/spool/pmg
+ chgrp -R pmg /var/spool/pmg || true
+ chmod -R g+w /var/spool/pmg || true
chgrp -Rv pmg /etc/pmg/dkim
chmod -Rv g+rX /etc/pmg/dkim
--
2.47.3
reply other threads:[~2026-06-22 8:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260622082137.2431-1-s.ivanov@proxmox.com \
--to=s.ivanov@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.