Clamd Status: "/bin/mkdir: cannot create directory ‘/r"

Discussion in 'Installation/Configuration' started by snowweb, Sep 3, 2020.

  1. snowweb

    snowweb Member

    Users are complaining that mail is not being delivered (although some seems to be getting through). Upon checking, when I check clamd status:
    In /var/log/mail.log I'm seeing:
    Any ideas please?

    ISPConfig: 3.1 dev (installed following Perfect Server guide)
    Ubuntu 18.04.5 LTS
    Last edited: Sep 3, 2020
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    I suspect that error is a cut-off version of
    /bin/mkdir: cannot create directory '/run/clamav': File exists
    Which is probably fine if that runtime directory is not normally cleaned up, or might indicate another clamd process is already running if it is (ie. if that directory is normally cleaned up).

    Try stopping clamav-daemon service, does that indicate success or failure? Are there any clamd processes running? What's in /run/clamav/ ?

    On another note, I usually see amavis continue to function even when clamd is down, as it has fallback code for calling clamscan directly (it's slower and not how you want it running long-term, but helps to keep some mail flowing). That's on our debian servers, though I sure would expect ubuntu to act the same way. It might be worth checking amavis logs when it starts up (and possibly increase debuggin) to try to figure out why the fallback isn't working.
  3. snowweb

    snowweb Member

    It stops without an error. The directory contains nothing, whether clamav is running or not.

    Actually, in my post above it says the status is "Active (running)" but I was too quick in taking the screenshot, after startup is complete status becomes:
    I'm also seeing many lines like:
    I have also set in the /etc/clamav/conf.ini LogVerbose true but this is all I'm seeing:
    Last edited: Sep 3, 2020
  4. snowweb

    snowweb Member

    Is it worth re-installing it?
    Can I do,
  5. snowweb

    snowweb Member

    It looks like I have a workaround and was able to get it running at least, but it's not ideal as I have to remove /run/clamav manually each time I want to stop/restart the service. If I don't, I'll get the error above and the service stops functioning.
    In trying to fix it, I also re-installed clamav, following this tutorial. It went smoothly (I think), but still after having done that, the problem persisted until I removed /run/clamav manually.
    Does anyone have any thoughts why I'm having to do that though?

Share This Page