tmpfs /var/run/clamav does not exist after reboot

Bug #29571 reported by Bart Verwilst
4
Affects Status Importance Assigned to Milestone
clamav (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

After rebooting, clamav-daemon does not start because it can't create the socket files in /var/run/clamav, because that directory doesn't exist. The init script should first create the directory and chown it to the user that clamav runs under..

Thanks in advance!

Revision history for this message
Carlos Eduardo Pedroza Santiviago (segfault) wrote :

I've confirmed it and made this following change:
[...]
  start)
    mkdir -p /var/run/clamav
    chown clamav:clamav /var/run/clamav
  if [ -z "$RUN_SUPERVISED" ] ; then
[...]

However, it would be more correct to get the user who'll run clamav from /etc/clamav/clamd.conf, and then chown to him.Like:

USER="`grep ^User $CLAMAVCONF | awk '{print $2}'`"

Changed in clamav:
status: Unconfirmed → Confirmed
Revision history for this message
Bart Verwilst (verwilst) wrote :

Yip, got the same fix on my production systems as well :)

Revision history for this message
Bart Verwilst (verwilst) wrote :

Is fixed in current versions.. IIRC can be closed!

Revision history for this message
Dennis Kaarsemaker (dennis) wrote : Re: [Bug 29571] tmpfs /var/run/clamav does not exist after reboot

 status FixReleased

Changed in clamav:
status: Confirmed → Fix Released
Revision history for this message
Bart Verwilst (verwilst) wrote : Fix owner of /var/run/clamav

One more fix ( currently it's not fully fixed ). The directory is made now by the init script, but the directory has wrong permissions ( root:root ), so clamav-daemon will not start because write access is refused. My patch fully fixes this.

Revision history for this message
Bart Verwilst (verwilst) wrote :

Same thing should be changed in /etc/init.d/clamav-freshclam, but then for directory /var/log/clamav/ -R.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.