The Musing
We use Moodle at Mars Hill – at least three (3) different instances. One for our main LMS, one for TimeTracker, and one for myMHU, our campus intranet.
This past weekend, I braved the frozen tundra of our server room to upgrade the OS on our campus intranet server to CentOS 7. Seriously, I needed a parka. At least it’s better than the days of our servers overheating and shutting down, due to inadequate cooling systems included in the plan for that room, but I digress.
After getting everything up and running, I got an error notification that ClamAV was failing to run properly. I had set it up and verified the paths in Moodle, but for some reason it was failing every time someone tried to upload a file.
The Fix
After lots of Googling, I figured I better document how I fixed this problem so that if (when?) I run into it again, I won’t be stumped.
I found a great guide posted by WebHep – Diego something or other – on the Moodle forum. Unfortunately, I had done (most) of that already, and was still getting this error
ERROR: Could not lookup : Servname not supported for ai_socktype
when I tried to run clamdscan from the command line.
It turns out, I found the solution posted deep in a clamd mailing list. The directory where the socket lives needed different permissions, so a simple
chmod 755 /var/run/clamd.scan/
(seems to have ) fixed everything.
Now, I just need to remember that I blogged about this issue when I upgrade the next server.