Bug 688435 - Mailman list archives fail - wrong permissions created during list setup
Summary: Mailman list archives fail - wrong permissions created during list setup
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mailman
Version: 14
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jan Kaluža
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-17 03:06 UTC by Kurt Seifried
Modified: 2011-04-18 21:24 UTC (History)
1 user (show)

Fixed In Version: mailman-2.1.13-8.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-15 21:43:14 UTC
Type: ---


Attachments (Terms of Use)
patch (827 bytes, patch)
2011-03-17 10:02 UTC, Jan Kaluža
no flags Details | Diff

Description Kurt Seifried 2011-03-17 03:06:17 UTC
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.12 Safari/534.24

Mailman can keep archives of messages sent. To do so it writes to files in /var/lib/mailman/archives/private/[listname] and [listname.mbox]. By default these directories are created when the newlist command is run with permissions root:apache:
==========================
[root@server3 private]# pwd
/var/lib/mailman/archives/private
[root@server3 private]# ls -la
total 16
drwxrws--- 4 mailman apache  4096 Mar 16 21:00 .
drwxrwsr-x 4 root    mailman 4096 Mar 16 20:59 ..
drwxrwsr-x 2 root    apache  4096 Mar 16 21:00 testlist
drwxrwsr-x 2 root    apache  4096 Mar 16 21:00 testlist.mbox
==========================

However this is wrong and prevents mailman from making any archives (/var/log/mailman/error):

==========================
Mar 16 04:00:28 2011 (13494) Archive file access failure:
        /var/lib/mailman/archives/private/testlist.mbox/testlist.mbox [Errno 13] Permission denied: '/var/lib/mailman/archives/private/testlist.mbox/testlist.mbox'
Mar 16 04:00:28 2011 (13494) Uncaught runner exception: [Errno 13] Permission denied: '/var/lib/mailman/archives/private/testlist.mbox/testlist.mbox'
Mar 16 04:00:28 2011 (13494) Traceback (most recent call last):
  File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 120, in _oneloop
    self._onefile(msg, msgdata)
  File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 191, in _onefile
    keepqueued = self._dispose(mlist, msg, msgdata)
  File "/usr/lib/mailman/Mailman/Queue/ArchRunner.py", line 73, in _dispose
    mlist.ArchiveMail(msg)
  File "/usr/lib/mailman/Mailman/Archiver/Archiver.py", line 200, in ArchiveMail
    self.__archive_to_mbox(msg)
  File "/usr/lib/mailman/Mailman/Archiver/Archiver.py", line 169, in __archive_to_mbox
    mbox = self.__archive_file(afn)
  File "/usr/lib/mailman/Mailman/Archiver/Archiver.py", line 157, in __archive_file
    return Mailbox.Mailbox(open(afn, 'a+'))
IOError: [Errno 13] Permission denied: '/var/lib/mailman/archives/private/testlist.mbox/csa-chapters.mbox'
==========================

changing ownership to mailman:apache of the directories in /var/lib/mailman/archives/private corrects the issue as the mailman processes (which run as mailman) can now write to the directories. 



Reproducible: Always

Steps to Reproduce:
1. Install mailman
2. create newlist
3. enable archiving of messages
4. send message. fails to archive due to permissions.
Actual Results:  
no archives.

Expected Results:  
message gets archives

Comment 1 Jan Kaluža 2011-03-17 10:00:48 UTC
Hi, this patch should fix that. I will send it to upstream and see if it will be accepted.

Comment 2 Jan Kaluža 2011-03-17 10:02:57 UTC
Created attachment 485971 [details]
patch

Comment 3 Fedora Update System 2011-04-06 06:17:32 UTC
mailman-2.1.13-8.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/mailman-2.1.13-8.fc14

Comment 4 Fedora Update System 2011-04-06 06:19:38 UTC
mailman-2.1.14-6.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mailman-2.1.14-6.fc15

Comment 5 Jan Kaluža 2011-04-06 06:22:18 UTC
I have fixed it differently in the end. It turned up, that /var/lib/mailman/archives/private should be owned by apache:mailman instead of mailman:apache and this fixes the problem.

Comment 6 Fedora Update System 2011-04-06 22:34:00 UTC
Package mailman-2.1.13-8.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mailman-2.1.13-8.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/mailman-2.1.13-8.fc14
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2011-04-15 21:43:10 UTC
mailman-2.1.14-6.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2011-04-18 21:23:58 UTC
mailman-2.1.13-8.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.