all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: Stoiko Ivanov <s.ivanov@proxmox.com>, pmg-devel@lists.proxmox.com
Subject: Re: [PATCH pmg-api] d/postinst: do not error out on chown/chmod /var/spool/pmg/
Date: Tue, 14 Jul 2026 11:30:15 +0200	[thread overview]
Message-ID: <ef7b02b5-6b1a-433e-8ac6-a725b610611e@proxmox.com> (raw)
In-Reply-To: <20260622082137.2431-1-s.ivanov@proxmox.com>

Looks mostly good for me, the only downside to this i could imagine
would be that other failure wouldn't be detected anymore (e.g. wrong
permissions, broken storage, etc.) but i guess these will
appear with processing mails anyway sooner or later..

from my POV this change should be fine

On 6/22/26 10:22 AM, Stoiko Ivanov wrote:
> 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





  reply	other threads:[~2026-07-14  9:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-22  8:21 [PATCH pmg-api] d/postinst: do not error out on chown/chmod /var/spool/pmg/ Stoiko Ivanov
2026-07-14  9:30 ` Dominik Csapak [this message]
2026-07-15 13:10 ` applied: " Fabian Grünbichler

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=ef7b02b5-6b1a-433e-8ac6-a725b610611e@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    --cc=s.ivanov@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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal