[clamav-users] create /var/run/clamav on reboot in Fedora, otherwise Pulseaudio errors occur

Arjen de Korte build+clamav at de-korte.org
Wed Aug 5 17:04:59 UTC 2020


Citeren Robert Kudyba <rkudyba at fordham.edu>:

> Using Fedora 31, this has been happening for quite a while. After reboot
> /var/run/clamav is removed, which is expected. However, wehn ClamAV was
> installed the user created in /etc/passwd looks like this:
> clamav:x:985:981::/var/run/clamav:/sbin/nologin
>
> So Pulseaudio tries to create the following directories/files:
>
> Aug  5 10:14:02 myuser pulseaudio[1392074]: E: [pulseaudio] core-util.c:
> Failed to create secure directory (/var/run/clamav/.config/pulse): No such
> file or directory
> Aug  5 10:14:02 myuser systemd[1392030]: pulseaudio.service: Main process
> exited, code=exited, status=1/FAILURE
> Aug  5 10:14:02 myuser systemd[1392030]: pulseaudio.service: Failed with
> result 'exit-code'.
> Aug  5 10:14:02 myuser systemd[1392030]: Failed to start Sound Service.
> Aug  5 10:14:02 myuser systemd[1392030]: pulseaudio.service: Scheduled
> restart job, restart counter is at 2.
> Aug  5 10:14:02 myuser systemd[1392030]: Stopped Sound Service.
> Aug  5 10:14:02 myuser systemd[1392030]: Starting Sound Service...
>
> So a work-around I've found
> <https://bugzilla.redhat.com/show_bug.cgi?id=1312035#c2> is to update
> /lib/systemd/system/clamd.service with:
>
> ExecStartPre = /usr/bin/mkdir -p /var/run/clamav
> ExecStartPre = /usr/bin/chown -R clamav.clamav /var/run/clamav
>
> Is this a known issue?

This is not the right solution. See

https://fedoraproject.org/wiki/Packaging:Tmpfiles.d

how to correctly set this up under systemd. Whoever packaged this in  
Fedora with this configuration, should set this up in the package  
instead.




More information about the clamav-users mailing list