Home

Geeklog: What I Learnt Today / Adam

freshclam: connect(): Permission denied

> Recently came across an odd error on a unix server that confused me got this message:

../cron.daily/freshclam:
connect(): Permission denied

So ssh'd on to the machine to run the script manually. First time the script ran same error, second time the script rang no error. Slightly confusing why would it not be able to get connect the first time and be fine after that? But then fail to connect the next day in the same way.
After browsing the logs found out that it wasn't failing to connect to to download new virus definitions as I'd assumed. It was failing to tell Clamd that it had updated its virus definitions. Which explained it only failing the first time because the second or third time you ran the script it had already updated its definitions and so didn't need to to notify Clamd and therefore didn't fail.
Once the Clamd was restarted the script ran without error. Guess it all goes to show as Tim says "assume makes and ass out of u and me".

/ Adam