[Mailman-Users] mailman cron throwing persistent lockerror(IOError: [Errno 2] No such file or directory...)

Bob R bob.reap at gmail.com
Thu Mar 28 00:07:52 CET 2013


On Wed, Mar 27, 2013 at 11:29 AM, Mark Sapiro <mark at msapiro.net> wrote:

> Bob R wrote:
> >
> >$ ll /var/lib/mailman/locks/
> >total 8
> >drwxrwsr-x 2 root list  80 Mar 26 12:22 ./
> >drwxrwxrwt 5 root root 100 Mar 26 07:33 ../
> >-rw-rw-r-- 2 list list  61 Mar 27  2013 master-qrunner
> >-rw-rw-r-- 2 list list  61 Mar 27  2013 master-qrunner.mydomain.com.3488
>
>
> That's a bit unusual.
>
> drwxrwxrwt 5 root root 100 Mar 26 07:33 ../
>
> refers to the /var/lib/mailman/ directory. I would expect it to be
>
> drwxrwsr-x 5 root list 100 Mar 26 07:33 ../
>
> however, I don't think that would cause this issue.
>
> Is it only cron jobs that have this issue? Are they running as user
> 'list' (they should be). does 'somelist' work normally otherwise? Can
> you access its web admin interface?
>

Cron jobs are run as the user listed after the date code, correct?  Thus
"lists" is the user the scripts run under - here is the mailman cron...

/etc/cron.d$ sudo cat mailman
# At 8AM every day, mail reminders to admins as to pending requests.
# They are less likely to ignore these reminders if they're mailed
# early in the morning, but of course, this is local time... ;)
0 8 * * * list [ -x /usr/lib/mailman/cron/checkdbs ] &&
/usr/lib/mailman/cron/checkdbs
#
# At 9AM, send notifications to disabled members that are due to be
# reminded to re-enable their accounts.
0 9 * * * list [ -x /usr/lib/mailman/cron/disabled ] &&
/usr/lib/mailman/cron/disabled
#
# Noon, mail digests for lists that do periodic as well as threshold
delivery.
0 12 * * * list [ -x /usr/lib/mailman/cron/senddigests ] &&
/usr/lib/mailman/cron/senddigests
#
# 5 AM on the first of each month, mail out password reminders.
0 5 1 * * list [ -x /usr/lib/mailman/cron/mailpasswds ] &&
/usr/lib/mailman/cron/mailpasswds
#
. . .
# At 3:27am every night, regenerate the gzip'd archive file.  Only
# turn this on if the internal archiver is used and
# GZIP_ARCHIVE_TXT_FILES is false in mm_cfg.py
27 3 * * * list [ -x /usr/lib/mailman/cron/nightly_gzip ] &&
/usr/lib/mailman/cron/nightly_gzip
#
# At 4:30AM daily, cull old entries from the 'bad' and 'shunt' queues.
30 4 * * * list [ -x /usr/lib/mailman/cron/cull_bad_shunt ] &&
/usr/lib/mailman/cron/cull_bad_shunt


The interface for the list works perfectly.

I have "rmlist -a" the list and rebuilt it, and mailman functions perfectly
for list mail.

I removed the sticky bit on /var/lib/mailman (and /locks) but the command
still failed:

$ sudo -u list  [ -x /usr/lib/mailman/cron/checkdbs ] &&
/usr/lib/mailman/cron/checkdbs
Traceback (most recent call last):
  File "/usr/lib/mailman/cron/checkdbs", line 203, in <module>
    main()
  File "/usr/lib/mailman/cron/checkdbs", line 86, in main
    mlist = MailList.MailList(name)
  File "/var/lib/mailman/Mailman/MailList.py", line 128, in __init__
    self.Lock()
  File "/var/lib/mailman/Mailman/MailList.py", line 161, in Lock
    self.__lock.lock(timeout)
  File "/var/lib/mailman/Mailman/LockFile.py", line 243, in lock
    self.__write()
  File "/var/lib/mailman/Mailman/LockFile.py", line 422, in __write
    fp = open(self.__tmpfname, 'w')
IOError: [Errno 13] Permission denied:
'/var/lib/mailman/locks/somelist.lock.mydomain.com.27297.0'


"Permission denied..."  The error seems pretty straightforward, what is it
looking for, and why wouldn't check_perms catch it?

-br


More information about the Mailman-Users mailing list