Howto fix "[Errno 13] Permission denied" in mailman mailing lists

6,660

Solution 1

After consulting the support team, I now have the solution for this problem: /usr/lib/mailman/bin/check_perms -f does all the permission magic in the mailman directories. Maybe this helps someone else with the same problem.

Solution 2

I want to add that on my machine,

/usr/lib/mailman/bin/check_perms -f

didn't fix everything. When I ran it repeatedly (as root), it kept complaining abut 10 issues (folders/files in /usr/lib/mailman that weren't owned by the user and group list).

The following command run in /usr/lib/mailman/ or /var/lib/mailman/ (depends on which directory the error is found by the first command):

chown -hR list:list ./*

This will fix everything.

Solution 3

my rep is too low to +1 your answer L3viathan but thank you! I had exactly the same problem running /usr/lib/mailman/bin/check_perms -f, even as root:

# /usr/lib/mailman/bin/check_perms -f
/var/lib/mailman/Mailman bad group (has: root, expected list) (fixing)
/var/lib/mailman/logs bad group (has: root, expected list) (fixing)
/var/lib/mailman/bin bad group (has: root, expected list) (fixing)
/var/lib/mailman/cgi-bin bad group (has: root, expected list) (fixing)
/var/lib/mailman/icons bad group (has: root, expected list) (fixing)
/var/lib/mailman/mail bad group (has: root, expected list) (fixing)
/var/lib/mailman/cron bad group (has: root, expected list) (fixing)
/var/lib/mailman/scripts bad group (has: root, expected list) (fixing)
/var/lib/mailman/templates bad group (has: root, expected list) (fixing)
/var/lib/mailman/locks bad group (has: root, expected list) (fixing)
Problems found: 10
Re-run as list (or root) with -f flag to fix

changing the owner manually fixed the permissions problem. only difference was my permissions problems were in path /var/lib/mailman:

# cd /var/lib/mailman
# chown -hR list:list ./*
# /usr/lib/mailman/bin/check_perms -f
No problems found

Solution 4

this helped me alot. My setup is currently plesk, qmail and mailman. i found that the path for chmod should be

/var/lib/mailman

more useful. doing a regular chown -hR list:list ./* there ist not too bad. there does

/var/lib/mailman/bin/check_perms -f

even work. for me.

also

chown -R popuser:list /var/list/

did a good job for me.

/var/qmail/bin/qmail-qstat

and

/var/qmail/bin/qmail-qread

were also good friends in helping. also looking inside of

/var/qmail/queue

http://www.simonmetzger.de/?p=124
http://www.huschi.net/archiv/plesk-qmail-probleme-mit-mailman.html
http://douglasward.net/2010/07/29/required-mailman%C2%A0permissions/
http://recoveringphysicist.com/22/how-to-move-a-mailman-mailing-list-between-domains-or-servers
http://www.gnu.org/software/mailman/site.html
http://techshihab.wordpress.com/2012/05/11/logs-location-for-plesk-linux-servers/

Files to watch:

/usr/local/psa/var/log/maillog
/var/log/mailman/smtp-failure
/var/log/mailman/error

Tools used

/var/mailman/bin/unshunt
/var/mailman/bin/arch

And always to make sure all List Options (max_size, advertisement, ... are set correctly) I'm not sure if this is any help to someone, but enjoy.

Share:
6,660

Related videos on Youtube

Michael
Author by

Michael

I am a web developer/devops guy, mostly working with PHP (TYPO3, Symfony) and monitoring stuff (prometheus, Grafana, ELK). Usability and UX are pretty interesting, too!

Updated on September 18, 2022

Comments

  • Michael
    Michael almost 2 years

    After migrating domains from one plesk server onto another, I got several of those mails every day: (the target mailbox does not exist, so I get those as undeliverable mail bounces)

    Return-Path: <[email protected]>
    Received: (qmail 26460 invoked by uid 38); 26 May 2012 12:00:02 +0200
    Date: 26 May 2012 12:00:02 +0200
    Message-ID: <20120526100002.xyzxx.qmail@lvpsxxx-xx-xx-xx.dedicated.hosteurope.de>
    From: [email protected] (Cron Daemon)
    To: [email protected]
    Subject: Cron <list@lvpsxxx-xx-xx-xx> [ -x /usr/lib/mailman/cron/senddigests ] && /usr/lib/mailman/cron/senddigests
    Content-Type: text/plain; charset=ANSI_X3.4-1968
    X-Cron-Env: <SHELL=/bin/sh>
    X-Cron-Env: <HOME=/var/list>
    X-Cron-Env: <PATH=/usr/bin:/bin>
    X-Cron-Env: <LOGNAME=list>
    
    List: xyzxyz: problem processing /var/lib/mailman/lists/xyzxyz/digest.mbox:
    [Errno 13] Permission denied: '/var/lib/mailman/archives/private/xyzxyz'
    

    I tried to fix the permissions myself, but the problem still exists.

  • Joost
    Joost almost 9 years
    Note that in some distributions, mailman is installed with symlinks in /var/lib/mailman. These are not fixed by check_perms, but can be fixed by adding -h to chown or chgrp. See the answers below.
  • Samizdis
    Samizdis almost 3 years
    Thanks, this fixed my problem too. Worth mentioning the reason that this works, while check_perms -f doesn't. The -h flag of chown is "no-dereference: affect symbolic links instead of any referenced file". On my machine, the files/folders which weren't fixed by check_perms were symbolic links, and check_perms was changing the permissions of the referenced file but not the symlink.