Description of problem:
The RPM doesn't create /var/run/amavisd, the amvaisd.pid file gets created here at runtime. This directory needs to be created with g+w permissions with group amavis for this package to work correctly.
Version-Release number of selected component (if applicable):
It appears that every time amavis shuts down, it erases /var/run/amavisd.
I do not know what the proper solution is, but for now I am editing /etc/rc.d/init.d/amavisd, placing the following right after RETVAL=0
chgrp amavis /var/run/amavisd
chmod g+w /var/run/amavisd
In Fedora 15, /var/run and /var/lock are tmpfs filesystems and hence are cleared at every reboot. All packages that maintain files/directories within those directories need to take this into account. Creating them in the initscript is one option, and dropping a file into /etc/tmpfiles.d to get systemd to do it would be another.
Is there anyway to get a proper fix in the RPM package?
Created attachment 501354 [details]
The fix seems to be to place this in /etc/tmpfile.d from the RPM. Is it possible to get this added so that things work properly out of the box? Thank you.
amavisd-new, clamd.amavid, and postfix is a common email configuration. Not sure how something like this would slip through pre-release test.
I never did check clamd.amavisd. It may need a similar fix (although it works without it, just as dspam largely did).
(In reply to comment #4)
> Created attachment 501354 [details]
> tmpfile.d file
> The fix seems to be to place this in /etc/tmpfile.d from the RPM. Is it
> possible to get this added so that things work properly out of the box? Thank
I have this file added and that doesn't work. No creation of the missed directory in /var/run
even at boot or using start|stop of amavisd. May be this is a timimg issue, I couldn't find out why.
The only working solution at present is creating the missed directory inside of the start|stop script, as Trever wrote already.
It's "/etc/tmpfiles.d", not "/etc/tmpfile.d"; the conf files from there are processed by systemd at boot time. The package should also include the required directories itself so that they are created at package install time so that the package can work immediately after installation without requiring a reboot.
Sorry, was typo, of course I have placed the file at the right directory, there are several similiar files, for example httpd.conf. That doesn't work for amavisd.
The attachment from Comment #4 doesn't line up with the permissions/ownership in the spec file for amavisd-new, and that's why it's not working. Try using this line instead:
d /var/run/amavisd 0755 amavis amavis -
This works for me.
Confirmed. Right ownership for user and group now. I'll remove now the - liitle bit - ugly code from start stop script.
Sorry, I thought I had the right permissions. Thank you for fixing it.
*** Bug 704769 has been marked as a duplicate of this bug. ***
Still not fixed in the repositories yet.
amavisd-new-2.6.6-1.fc15 has been submitted as an update for Fedora 15.
amavisd-new-2.6.6-1.fc16 has been submitted as an update for Fedora 16.
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing amavisd-new-2.6.6-1.fc16'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
amavisd-new-2.6.6-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
amavisd-new-2.6.6-1.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.