[clamav-users] /bin/mkdir: cannot create directory ‘/run/clamav’: File exists

Dino Edwards dino.edwards at mydirectmail.net
Tue Oct 16 17:12:12 UTC 2018


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.


Hello,

I’m getting the following error on clamav on Ubuntu 16.04 LTS when I look at the service status:

Loaded: loaded (/lib/systemd/system/clamav-daemon.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/clamav-daemon.service.d
           └─extend.conf
   Active: active (running) since Tue 2018-10-09 12:12:22 EDT; 4s ago
     Docs: man:clamd(8)
           man:clamd.conf(5)
           https://www.clamav.net/documents/
  Process: 14202 ExecStartPre=/bin/chown clamav /run/clamav (code=exited, status=0/SUCCESS)
  Process: 14199 ExecStartPre=/bin/mkdir /run/clamav (code=exited, status=1/FAILURE)
Main PID: 14207 (clamd)
    Tasks: 1
   Memory: 225.1M
      CPU: 3.902s
   CGroup: /system.slice/clamav-daemon.service
           └─14207 /usr/sbin/clamd --foreground=true

Oct 09 12:12:22 hermes systemd[1]: Starting Clam AntiVirus userspace daemon...
Oct 09 12:12:22 hermes systemd[1]: Started Clam AntiVirus userspace daemon.
Oct 09 12:12:22 hermes mkdir[14199]: /bin/mkdir: cannot create directory ‘/run/clamav’: File exists

I got a response from someone about this error but I can’t seem to find their email. One thing I noticed is that the clamd.conf file sets the “LocalSocket” to the  “/var/run/clamav” directory, however the error refers to the “/run/clamav” directory. I don’t see a symlink for those two directories, but the clamd.ctl file looks like the exact same file in both directories. If I delete the /var/run/clamav directory, I don’t get the error, but if I restart clamd again I get the error again. I’m not sure what the problem is, and I hope someone can help.

Thanks a lot




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clamav.net/pipermail/clamav-users/attachments/20181016/f6b9effe/attachment.htm>


More information about the clamav-users mailing list