linux administrators should really run the almighty monitor script once and a while.

while lnav is a great log viewer, it (right now) does not do a good job in catching all logs under /var/log/ and all errors.

so one used

grep -r -i -E --color=auto "freshclam" /var/log/*

to find all errors, the error was:

Can't create temporary directory /var/lib/clamav/clamav-969944fd9a258fa7aff08976496d8541.tmp

solution:

chown -R clam:clam /var/lib/clamav/

solution with explanation:

# edit passwd to allow user clam to have a shell
vim /etc/passw
# become the user clam
su - clam

# try to perform what it shall do
mkdir /var/lib/clamav/clamav-969944fd9a258fa7aff08976496d8541.tmp
mkdir: cannot create directory ‘/var/lib/clamav/clamav-969944fd9a258fa7aff08976496d8541.tmp’:
Permission denied
# solution was simply chown
chown -R clam:clam /var/lib/clamav/ 
# more errors:
/var/log/messages-20190901:Aug 28 18:06:43 webserver2 freshclam[20762]: Hint: The database directory must be writable for UID 1002 or GID 1002
/var/log/messages-20190901:Aug 28 21:06:43 webserver2 freshclam[2081]: ClamAV update process started at Wed Aug 28 21:06:43 2019
/var/log/messages-20190901:Aug 28 21:06:43 webserver2 freshclam[2081]: Can't create temporary directory /var/lib/clamav/clamav-0244b44dcfd50c604011c8941ff5a68d.tmp
/var/log/messages-20190901:Aug 28 21:06:43 webserver2 freshclam[2081]: Hint: The database directory must be writable for UID 1002 or GID 1002
/var/log/messages-20190901:Aug 29 00:06:43 webserver2 freshclam[15552]: ClamAV update process started at Thu Aug 29 00:06:43 2019
/var/log/messages-20190901:Aug 29 00:06:43 webserver2 freshclam[15552]: Can't create temporary directory /var/lib/clamav/clamav-969944fd9a258fa7aff08976496d8541.tmp
/var/log/messages-20190901:Aug 29 00:06:43 webserver2 freshclam[15552]: Hint: The database directory must be writable for UID 1002 or GID 1002


liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin