Comment 2 for bug 731505

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hell dusanv, thank you for file this bug report and helping to make Ubuntu better.

This is caused by this snippet in /etc/init.d/courier-mta:

if [ ! -d ${run_dir} ]; then
        mkdir -p ${run_dir}
        chown daemon:daemon ${run_dir}
fi

Which was I believe added to fix this bug:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=349830

Which is similar.

It falsely assumes that $run_dir will be persistent across reboots. In fact, FHS section 5.13.1 shows that this is incorrect:

http://www.pathname.com/fhs/pub/fhs-2.3.pdf

"This directory contains system information data describing the system since it was booted. Files under this
directory must be cleared (removed or truncated as appropriate) at the beginning of the boot process."

The chown snippet should be done in the startup regardless of whether the mkdir needs to happen. I also think it should probably just chgrp on the dir, and authdaemon may need to be fixed as well to create its sub-dir with group ownership defaulting to 'daemon' r-x.

I'm reopening that bug to have the maintainer take another look.

Marking this bug as Triaged, importance Medium.

A workaround is to modify the init.d scripts for authdaemon and mta to modify the perms enough so it works every time.