edestecd / puppet-clamav

Puppet Module for managing ClamAV
GNU General Public License v3.0
6 stars 59 forks source link

cannot create directory '/run/clamav': File exists #34

Open Yamakasi opened 7 years ago

Yamakasi commented 7 years ago

The following happens on Ubuntu 17.04 after a successfull Puppetrun.

May 5 14:01:43 mailscan-02 mkdir[18384]: /bin/mkdir: cannot create directory '/run/clamav': File exists

edestecd commented 7 years ago

Are you getting this in a log? What is the path to the log?

Yamakasi commented 7 years ago

I see this in /var/log/syslog

edestecd commented 7 years ago

I don't see that the module is managing that file anywhere.
Maybe were changing the default of something? I'd do a diff on the deb provided default config vs the one this module makes... That may provide some insight

Yamakasi commented 7 years ago

OK, nice, I'm just testing this out of the blue, module itself looks nice!

edestecd commented 7 years ago

Any word on this? Still having issue?

emmenlau commented 4 years ago

I have been affected by this issue even though I'm not sure this is the right place to report it? It seems the clamav-daemon startup script on Ubuntu 18.04 creates the directory without checking if it exists first. A possible solution was:

diff --git a/systemd/system/clamav-daemon.service.d/extend.conf b/systemd/system/clamav-daemon.service.d/extend.conf
index a8f64eb..49319d5 100644
--- a/systemd/system/clamav-daemon.service.d/extend.conf
+++ b/systemd/system/clamav-daemon.service.d/extend.conf
@@ -1,3 +1,3 @@
 [Service]
-ExecStartPre=-/bin/mkdir /run/clamav
+ExecStartPre=-/bin/mkdir -p /run/clamav
 ExecStartPre=/bin/chown clamav /run/clamav
ubellavance commented 4 years ago

I doubt this file is provided or modified by the module. Can you run dpkg -S on the extend.conf file (full path)?

gomanuke commented 2 years ago

Ju

I have been affected by this issue even though I'm not sure this is the right place to report it? It seems the clamav-daemon startup script on Ubuntu 18.04 creates the directory without checking if it exists first. A possible solution was:

Just the same still on Debian 10. extend.conf requires -p