[clamav-users] /bin/mkdir: cannot create directory ‘/run/clamav’: File exists
Dino Edwards
dino.edwards at mydirectmail.net
Wed Oct 17 16:21:13 UTC 2018
Hi Kris thanks for trying to help,
Here you go:
dpkg -L clamav-daemon |grep system
/lib/systemd
/lib/systemd/system
/lib/systemd/system/clamav-daemon.service
cat /lib/systemd/system/clamav-daemon.service
[Unit]
Description=Clam AntiVirus userspace daemon
Documentation=man:clamd(8) man:clamd.conf(5) https://www.clamav.net/documents/
# Check for database existence
ConditionPathExistsGlob=/var/lib/clamav/main.{c[vl]d,inc}
ConditionPathExistsGlob=/var/lib/clamav/daily.{c[vl]d,inc}
[Service]
ExecStart=/usr/sbin/clamd --foreground=true
# Reload the database
ExecReload=/bin/kill -USR2 $MAINPID
StandardOutput=syslog
[Install]
WantedBy=multi-user.target
cd /etc/systemd/system/clamav-daemon.service.d
root at hermes:/etc/systemd/system/clamav-daemon.service.d# ls
extend.conf
root at hermes:/etc/systemd/system/clamav-daemon.service.d# cat extend.conf
[Service]
ExecStartPre=-/bin/mkdir /run/clamav
ExecStartPre=/bin/chown clamav /run/clamav
-----Original Message-----
From: clamav-users [mailto:clamav-users-bounces at lists.clamav.net] On Behalf Of Kris Deugau
Sent: Wednesday, October 17, 2018 10:38 AM
To: ClamAV users ML <clamav-users at lists.clamav.net>
Subject: Re: [clamav-users] /bin/mkdir: cannot create directory ‘/run/clamav’: File exists
Dino Edwards wrote:
> Answering my own question on the /var/run and the /run directories.
> There is a link between the two, I just didn’t go up a level in the
> directory structure. The question about the error still remains though.
The chown and mkdir look a bit suspect to me; I'm not seeing anything like that in the Debian packages (which should be mostly the same in Ubuntu). What I *do* see in one of the stock files
(/lib/systemd/system/clamav-daemon.socket) is this stanza:
[Socket]
ListenStream=/run/clamav/clamd.ctl
#ListenStream=127.0.0.1:1024
SocketUser=clamav
SocketGroup=clamav
RemoveOnStop=True
which if I understand correctly, implies that clamd on this system is using systemd's socket creation/handling voodoo rather than doing so itself.
Can you post:
- Output from "dpkg -L clamav-daemon |grep system"
- Contents of any .service or .socket files from the above list
- Contents of any files in /etc/systemd/system/clamav-daemon.service.d
> Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled;
> vendor preset: enabled)
>
> Drop-In: /etc/systemd/system/clamav-daemon.service.d
>
> └─extend.conf
This seems to indicate that you're not using the stock systemd service definitions from Ubuntu/Debian upstream.
-kgd
_______________________________________________
clamav-users mailing list
clamav-users at lists.clamav.net
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users
Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq
http://www.clamav.net/contact.html#ml
More information about the clamav-users
mailing list