Bug 46281 - clamav and freshclam can't save PID file
clamav and freshclam can't save PID file
Status: RESOLVED WORKSFORME
Product: UCS
Classification: Unclassified
Component: clamav
UCS 4.2
Other other
: P5 normal (vote)
: ---
Assigned To: Tobias Wenzel
Sönke Schwardt-Krummrich
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-02-13 14:58 CET by Michael Grandjean
Modified: 2020-02-13 15:54 CET (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.103
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Cleanup, External feedback, Workaround is available
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Grandjean univentionstaff 2018-02-13 14:58:57 CET
# univention-app info
UCS: 4.2-3 errata284
App Center compatibility: 4
Installed: mailserver=11

/var/log/clamav/clamav.log
> Tue Feb 13 14:36:33 2018 -> ERROR: Can't save PID in file /var/run/clamav/clamd.pid

/var/log/clamav/freshclam.log
> ERROR: Can't save PID to file /var/run/clamav/freshclam.pid: Permission denied


On a current UCS 4.2 system we have:
> drwxr-xr-x 2 root root 60 Feb  3 07:53 /var/run/clamav/

On a UCS 4.1-5 where I could not reproduce the problem we have:
> drwxr-xr-x 2 clamav root 100 Feb  2 20:42 /var/run/clamav/


Workaround:
> chown clamav /var/run/clamav


Alternative:
We ship a "PidFile" config option via "univention-antivir-mail" in the UCR templates for clamd and freshclam:
> PidFile /var/run/clamav/clamd.pid
But the current debian config does not contain such an option, because it is not needed since the switch to systemd:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804132#10

I suggest we remove the "PidFile" option from the UCR templates.
Comment 1 Tobias Wenzel univentionstaff 2020-02-13 15:54:19 CET
Could not reproduce on UCS 4.4-3

> drwxr-xr-x  2 clamav   root       60 Feb  5 17:32 /var/run/clamav

I'm leaving the pidfile option. If new problems arise, clone this bug and 
apply the changes for clam and freshclam.