pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mail/postfix: insufficient permissions for var/spool/postfix/...



Hi,

if I remove the var/spool/postfix/ subdirs from PLIST and leave only 
    @pkgdir var/spool/postfix
postfix starts fine after package install. So I propose the attached
patch to the PLIST file.

Regards
Matthias


On Fri, Jan 24, 2020 at 03:47:14PM +0100, Matthias Ferdinand wrote:
> On Fri, Jan 24, 2020 at 10:39:47AM +0100, Frédéric Fauberteau wrote:
> > Le 2020-01-23 13:34, Matthias Ferdinand a écrit :
> > > Hi,
> > > 
> > > since several months there are postfix spool dir permission problems
> > > after
> > > package upgrades (pkgsrc-current, Ubuntu 14.04, Ubuntu 18.04, and an
> > > extremely old SuSE system).
> > > 
> > > They show e.g. at the start of the daemon:
> > > 
> > >     postfix/postfix-script: warning: not owned by postfix:
> > > /opt/pkgsrc/var/spool/postfix/active
> ...
> > Hi,
> > 
> > Shouldn't the var/spool/postfix/incoming directory be created by postfix
> > when it is first started? In this case, maybe a patch would be needed to fix
> > right user/group in the postfix sources.
> 
> Thanks, just checked that. If those dirs do not yet exist, postfix
> re-creates them with suitable permissions. If instead they do exist,
> permissions are not altered.
> 
> These subdirs of var/spool/postfix are listed as "@pkgdir" in PLIST, so
> they are created at package install or update (as root:root), and
> postfix then does not modify their access rights upon (re-)start.
> 
> So perhaps only "var/spool/postfix" should be listed as "@pkgdir", not
> all the subdirs.
> 
> Will try that later, might take a few days.
> 
> Is there any benefit for all the subdirs listed as "@pkgdir"? Perhaps
> for package removal?
> 
> Regards
> Matthias
--- mail/postfix/PLIST.orig	2020-01-26 22:08:59.891038079 +0100
+++ mail/postfix/PLIST	2020-01-26 21:38:32.623493272 +0100
@@ -203,20 +203,7 @@ share/examples/postfix/relocated
 ${PLIST.csasl}share/examples/postfix/smtpd.conf
 share/examples/postfix/transport
 share/examples/postfix/virtual
-@pkgdir var/spool/postfix/trace
-@pkgdir var/spool/postfix/saved
-@pkgdir var/spool/postfix/public
-@pkgdir var/spool/postfix/private
-@pkgdir var/spool/postfix/pid
-@pkgdir var/spool/postfix/maildrop
-@pkgdir var/spool/postfix/incoming
-@pkgdir var/spool/postfix/hold
-@pkgdir var/spool/postfix/flush
-@pkgdir var/spool/postfix/deferred
-@pkgdir var/spool/postfix/defer
-@pkgdir var/spool/postfix/corrupt
-@pkgdir var/spool/postfix/bounce
-@pkgdir var/spool/postfix/active
+@pkgdir var/spool/postfix
 @pkgdir var/db/postfix
 @pkgdir libexec/postfix/postfix-files.d
 @pkgdir libexec/postfix/dynamicmaps.cf.d


Home | Main Index | Thread Index | Old Index