Hi there, On Wed, 10 Oct 2018, Dino Edwards wrote:
... 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 Can someone point me in the right direction?
Full disclosure: I've never used Ubuntu so I don't know in detail how things will be set up on your system. The existing /run/clamav should be a directory with permissions which allow the ClamAV processes to write into it and into files and sockets in the directory. Here it is, and the contents, on one of my systems. First the directory: mail6:~$ >>> ls -l /run | grep clamav drwxr-x--- 2 clamav smmsp 140 Oct 1 06:25 clamav The owners/groups/permissions will likely be different on your system, and hopefully they'll have been set properly when the directory was first created. You probably don't care much about the dates, times and sizes of any of these things (but they might tell you forensically useful things) and you _do_ care that the first character on the line with 'clamav' in it is 'd' for 'directory'. Now the contents of the directory: mail6:~$ >>> ls -l /run/clamav total 12 srw-rw---- 1 clamav clamav 0 Oct 1 06:25 clamav-milter.ctl -rw-r----- 1 clamav root 5 Oct 1 06:25 clamav-milter.pid srw-rw---- 1 clamav clamav 0 Jul 12 09:06 clamd.ctl -rw-rw---- 1 clamav clamav 6 Jul 12 09:06 clamd.pid -rw-r----- 1 clamav root 6 Jul 12 09:05 freshclam.pid You may or may not be running clamav-milter, which is an interface between a mail server like Sendmail and the clamd daemon. If you aren't running it, you (most probably :) won't see those lines. The error message you're seeing is telling you that the system tried to create the directory but it found _something_ with that name was there already. Unfortunately /bin/mkdir isn't very specific about what it was that already existed; even if it's a directory it will call it a 'File'. You can use ls -l /run like I did above to see what you have there. If the existing /run/clamav is in fact a file (or even something else, but _not_ a directory) then it might be that if you just delete it that will fix your problem - but if it were my system I'd want to know how it got there in the first place. Maybe you created it by accident, maybe other people have been tinkering with the system. To know exactly what happened more information would be needed. If the 'file' which exists is in fact a directory called /run/clamav and it has the right permissions, then the error message may be harmless. As long as it has the right permissions it probably doesn't matter if it already exists when you restart clamd, or similar operations. It just needs to be there so that it can be used. It looks like the scripts are trying to ensure that, but they're getting it round their necks because of an oversight in one of the scripts. But if this prevents clamd from starting then obviously it's a problem. Either way, to get rid of the message you could change the script which creates the directory from /bin/mkdir /run/clamav to /bin/mkdir -p /run/clamav which I'd suggest is what should have been there in the first place. You could alternatively add a line in the script to remove the directory (and its contents) before attempting to create it, but be careful with things like that. See man mkdir for more information. You might also need to look at man chmod for information about setting permissions. Be careful with them. -- 73, Ged. _______________________________________________ clamav-users mailing list clamav-users@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