Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Nov 2022 09:04:10 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 267844] security/clamav: ERROR: Can't save PID to file /var/run/clamav/clamd.pid
Message-ID:  <bug-267844-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267844

            Bug ID: 267844
           Summary: security/clamav: ERROR: Can't save PID to file
                    /var/run/clamav/clamd.pid
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: yasu@freebsd.org
          Reporter: ohartmann@walstatt.org
             Flags: maintainer-feedback?(yasu@freebsd.org)
          Assignee: yasu@freebsd.org

Running security/clamav on recent CURRENT (14.0-CURRENT #108
main-n259290-f556a05c4926: Thu Nov 17 19:44:14 CET 2022 amd64). After the l=
ast
update, a couple of day ago from today (performing daily updates), clamd wo=
n't
startup again, see the error below.

This issue is well known if /var/run is on tmpfs or any other memory backed
filesystem vanishing after a reboot (this is a very common procedure in
environments of elevated security):

[...]
#:/usr/src # service clamav-clamd restart
clamav_clamd not running? (check /var/run/clamav/clamd.pid).
Starting clamav_clamd.
ERROR: Can't save PID to file /var/run/clamav/clamd.pid: No such file or
directory
/usr/local/etc/rc.d/clamav-clamd: WARNING: failed to start clamav_clamd

In /etc/rc.conf the tag=20

var_run_enable=3D"YES"

is set (all other var_run_ options are left untouched so far). The issue sh=
own
below has been discussed recently, I provided an alteration to the rc script
checking for the existence of /var/run at startup of clamav. According to m=
an
rc.conf(5) setting this variable/tag to YES should provide saving the folder
tree layout of /var/run and saving this to /var/db/mtree. Obvously, this is=
n't
correctly done, /var/db/mtree is empty on those hosts (var/db is on a
non-volatile device).

When I did the update of security/clamav, clamav-clamd was already running,
var/run/clamav existed. Shutting down/rebooting the system then left var/run
untouched after recreating, so I suppose this method is either flawed or it
doesn't work properly with clamav-clamd.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-267844-7788>