0

I've set up Mailman 2.1.16 on Ubuntu 14.04 LTS, Postfix and Apache.

Sending Mails through a relayhost works fine and I can use the Webinterface of Mailman. But the Webinterface does nothing regarding to administratives requests (Subscription Requests and held messages). These requests must be accepted by the administrator, but when I click Submit all Data nothing is done.

/var/log/mailman/error shows a error, but the timestamp is not related to my problem:

Sep 13 01:54:25 2014 (1161) send_digests() failed: [Errno 13] Permission denied: '/var/lib/mailman/archives/private/hsg/attachments'
Sep 13 01:54:25 2014 (1161) Traceback (most recent call last):
  File "/var/lib/mailman/Mailman/Handlers/ToDigest.py", line 99, in process
    send_digests(mlist, mboxfp)
  File "/var/lib/mailman/Mailman/Handlers/ToDigest.py", line 147, in send_digests
    send_i18n_digests(mlist, mboxfp)
  File "/var/lib/mailman/Mailman/Handlers/ToDigest.py", line 329, in send_i18n_digests
    msg = scrubber(mlist, msg)
  File "/var/lib/mailman/Mailman/Handlers/Scrubber.py", line 253, in process
    url = save_attachment(mlist, part, dir, filter_html=False)
  File "/var/lib/mailman/Mailman/Handlers/Scrubber.py", line 419, in save_attachment
    makedirs(fsdir)
  File "/var/lib/mailman/Mailman/Handlers/Scrubber.py", line 406, in makedirs
    os.makedirs(dir, 02775)
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/lib/mailman/archives/private/hsg/attachments'

check_perms -f gives me following errors:

sudo /usr/lib/mailman/bin/check_perms -f
/var/lib/mailman/icons falsche GID (ist: root, soll: list) (korrigiere)
/var/lib/mailman/Mailman falsche GID (ist: root, soll: list) (korrigiere)
/var/lib/mailman/mail falsche GID (ist: root, soll: list) (korrigiere)
/var/lib/mailman/templates falsche GID (ist: root, soll: list) (korrigiere)
/var/lib/mailman/scripts falsche GID (ist: root, soll: list) (korrigiere)
/var/lib/mailman/locks falsche GID (ist: root, soll: list) (korrigiere)
/var/lib/mailman/logs falsche GID (ist: root, soll: list) (korrigiere)
/var/lib/mailman/cron falsche GID (ist: root, soll: list) (korrigiere)
/var/lib/mailman/cgi-bin falsche GID (ist: root, soll: list) (korrigiere)
/var/lib/mailman/bin falsche GID (ist: root, soll: list) (korrigiere)

Seems that check_perms can't fix that problem. Any of that folders are symbolic links and i've set the permissions manually but nothing happens.

Any ideas? Is there any way to debug the webinterface?

polyte
  • 113
  • 1
  • 5
  • No that's not error. That information tells you that the GID permission is incorrect (the GID must be list instead of root). The word *korrigiere* means that mailman is fixing the permission problem for you. Have you try to access the mailman web interface after that? – masegaloeh Sep 15 '14 at 12:45
  • I run the check_params -f cmd several times and the message is always displayed (even after i fixed the ownership manually). I accessed the webinterface afterwards, but it doesn't do the admin tasks (send held back mails, subscriptions). – polyte Sep 15 '14 at 13:25
  • Did the permission have been altered (again) after you manually `chmod` it? – masegaloeh Sep 15 '14 at 13:31
  • I chown'ed them for the list user. So I didn't changed something with chmod. After executing check_perms the ownership is still the same. – polyte Sep 15 '14 at 14:09

2 Answers2

1

The problem is the "wrong" permissions are on symbolic links, not actual directories or files:

% ll /var/lib/mailman
drwxrwsr-x  4 root list 4096 Nov  2 05:43 archives/
lrwxrwxrwx  1 root root   20 Feb  3  2014 bin -> /usr/lib/mailman/bin/
lrwxrwxrwx  1 root root   24 Feb  3  2014 cgi-bin -> /usr/lib/cgi-bin/mailman/
lrwxrwxrwx  1 root root   21 Feb  3  2014 cron -> /usr/lib/mailman/cron/
drwxrwsr-x  2 root list 4096 Nov  2 05:47 data/
lrwxrwxrwx  1 root root   25 Feb  3  2014 icons -> /usr/share/images/mailman/
drwxrwsr-x  3 root list 4096 Nov  2 05:52 lists/
. . .

On Ubuntu (all Debian?) symbolic link permissions don't really matter - just the actual permissions of their target. Trying to change the permissions of the symbolic link will quietly fail (which is why running check_perms does nothing)

The solution is to use the -h flag on chown:

chown(1) - Linux man page

-h, --no-dereference

affect each symbolic link instead of any referenced file (useful only on systems that can change the ownership of a symlink)

Using the chown -h command, then running check_perms now should produce no errors:

% sudo chown -h root:list /var/lib/mailman/*

% sudo /usr/lib/mailman/bin/check_perms -f
No problems found

However, I don't think this is your actual problem - if you look, the error is thrown not on any of the symbolic links outputting in your check_perms notice, but on a subdirectory in /archives, which based on your check_perm output, has the proper permissions (no "fixing" message thrown). I don't know if this is a read or execute permission on a file or directory, but checking the attachments directory should shed some light there.

Bob SD
  • 125
  • 1
  • 8
0

Check your mailman permission. Those error maybe caused by invalid permission in /var/lib/mailman/. To fix permission run this command

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

For the documentation of that command, please refers to this page.

masegaloeh
  • 18,236
  • 10
  • 57
  • 106