Author Topic: [SOLVED] CLAMAV update problem  (Read 60312 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
[SOLVED] CLAMAV update problem
« on: August 16, 2015, 01:06:44 AM »
I make a new server and install clamav and extras, but in restart service i see this error log:

Stopping Clam AntiVirus Daemon: [  OK  ]
Starting Clam AntiVirus Daemon: LibClamAV Warning: **************************************************
LibClamAV Warning: ***  The virus database is older than 7 days!  ***
LibClamAV Warning: ***   Please update it as soon as possible.    ***
LibClamAV Warning: **************************************************
[  OK  ]


So, i try make a update on prompt with this: [root@server ~]# freshclam but i have this error
ERROR: Can't open /var/log/clamav/freshclam.log in append mode (check permissions!).
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).


How to fix this ?
« Last Edit: October 26, 2015, 08:19:26 PM by Igor S. »

Offline
**
Re: CLAMAV update problem
« Reply #1 on: September 16, 2015, 09:14:34 AM »
Hi,
Had same errors after CWP or Centos update.. could not receive emails from google some kind TLS error cant remember but there are paths changed to crt files. After fixed that in config had to change user from clam to root because clam could not scan any mail. Then I got that error since nothing with permissions didnt help I changed name of log file in config. Try that and see

Regards

Offline
*****
Re: CLAMAV update problem
« Reply #2 on: September 16, 2015, 04:53:50 PM »
Hi
Latest versions does not have any troubles with it.
ClamAV does not mostly bad permissions/owner to /var/clamav
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: CLAMAV update problem
« Reply #3 on: October 18, 2015, 04:18:42 AM »
Hi. I have problem with clamav. After I rebuilder postfix configuration with antivirus, spamasassin, DKIM and SPF is ttarted giving me error:

LibClamAV Warning: **************************************************
LibClamAV Warning: *** The virus database is older than 7 days. ***
LibClamAV Warning: *** Please update it IMMEDIATELY! ***
LibClamAV Warning: **************************************************

And it did not start automatically.
Now I tried to rebuild again, only the antivirus section, and now I get this error:

Starting Clam AntiVirus Daemon: ERROR: Can't initialize the internal logger
ERROR: Can't open /var/log/clamav/clamd.log in append mode (check permissions!).

What is wrong with this thing, and how do I fix it?

Thank You.

Offline
*
Re: CLAMAV update problem
« Reply #4 on: October 18, 2015, 04:52:25 AM »
I have the same problem since after rebuilt the postfix.



Found the solution by myself.

Make sure the /var/lib/clamav & /var/log/clamav with the right user & group.
Quote
chown -R clam:clam /var/lib/clamav
chown -R clam:clam /var/log/clamav

Open the file /etc/freshclam.conf and make sure the lines are set to as below:
Quote
DatabaseDirectory /var/lib/clamav
DatabaseOwner clam

Also make sure the lines at file /etc/clamd.conf been set to:
Quote
DatabaseDirectory /var/lib/clamav
User clam

Then, restart the clamd service and update the database.
Quote
service clamd restart
freshclam

It should works, at least for me yes.  ;)
« Last Edit: October 18, 2015, 05:46:50 AM by infinitech07 »

Offline
*
Re: CLAMAV update problem
« Reply #5 on: October 18, 2015, 09:50:32 AM »
I can confirm that infinitech07 ClamAV Update Tutorial worked for me.
Thank You! :)

Anyone could guide me how to make it auto boot now? Like all other services?

Offline
*****
Re: CLAMAV update problem
« Reply #6 on: October 26, 2015, 08:17:48 PM »

Anyone could guide me how to make it auto boot now? Like all other services?

CWP.admin:
"Services Config" -> "ChkConfig Manager" -> "Default On"
Command:
Code: [Select]
chkconfig clamd on
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: [SOLVED] CLAMAV update problem
« Reply #7 on: November 15, 2015, 07:56:19 PM »
clamav updater is in /scripts folder
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: [SOLVED] CLAMAV update problem
« Reply #8 on: February 03, 2016, 10:37:15 PM »
Sorry, but you can more detailed in your reply? i dont understand what means /scripts folder. What the location?
I get clamav updated using the following workaround but not could restart the service via CWP:

Code: [Select]
sudo chmod -R 777 /var/lib/clamav
sudo chmod -R 777 /var/log/clamav
sudo chmod -R 777 /var/log/clamav/freshclam.log
sudo freshclam
sudo chmod -R 640 /var/lib/clamav
sudo chmod -R 640 /var/log/clamav
sudo chmod -R 640 /var/log/clamav/freshclam.log

Thanks

Offline
*****
Re: [SOLVED] CLAMAV update problem
« Reply #9 on: February 05, 2016, 07:46:36 AM »
Hello.

Just run next few commands from SSH:
Code: [Select]
sed -i 's/DatabaseDirectory.*$/DatabaseDirectory\ \/var\/lib\/clamav/g' /etc/freshclam.conf
sed -i 's/DatabaseOwner.*$/DatabaseOwner\ clam/g' /etc/freshclam.conf
sed -i 's/DatabaseDirectory.*$/DatabaseDirectory\ \/var\/lib\/clamav/g' /etc/clamd.conf
sed -i 's/User.*$/User\ clam/g' /etc/clamd.conf
chown -R clam:clam /var/lib/clamav
chown -R clam:clam /var/log/clamav
freshclam
service clamd restart
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: [SOLVED] CLAMAV update problem
« Reply #10 on: February 19, 2016, 04:53:04 AM »
Igor S., i run these commands but receive this error on freshclam:
Code: [Select]
ERROR: Can't change dir to /var/lib/clamav
When i run "service clamd start" command, i receive the following error:
Code: [Select]
Starting Clam AntiVirus Daemon: LibClamAV Error: cli_load(): Can't open file /var/lib/clamav/bytecode.cld
LibClamAV Error: cli_loaddbdir(): error loading database /var/lib/clamav/bytecode.cld
ERROR: Can't open file or directory

I was searching about this error on google but not find nothing about.
You have some idea?

Thanks
« Last Edit: February 19, 2016, 05:00:44 AM by Hackaust »

Offline
*****
Re: [SOLVED] CLAMAV update problem
« Reply #11 on: February 19, 2016, 05:50:54 AM »
The commands was run without any errors? Are you sure?
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: [SOLVED] CLAMAV update problem
« Reply #12 on: November 01, 2016, 09:10:56 PM »
Igor S., i run these commands but receive this error on freshclam:
Code: [Select]
ERROR: Can't change dir to /var/lib/clamav
When i run "service clamd start" command, i receive the following error:
Code: [Select]
Starting Clam AntiVirus Daemon: LibClamAV Error: cli_load(): Can't open file /var/lib/clamav/bytecode.cld
LibClamAV Error: cli_loaddbdir(): error loading database /var/lib/clamav/bytecode.cld
ERROR: Can't open file or directory

I was searching about this error on google but not find nothing about.
You have some idea?

Thanks


mkdir //var/log/clamav
chown -R clam:clam /var/log/clamav
freshclam
service clamd restart

it's work

Offline
*
Re: CLAMAV update problem
« Reply #13 on: December 07, 2016, 09:04:51 PM »
Where exactly in the config did you go to change the path ?? I am having the same issue. I also have an issue with dovecot that points to wrong path. I can manually edit the .conf files but everytime i rebuild or restart mail services, the old config that points to wrong certificate comes back.  >:(

Hi,
Had same errors after CWP or Centos update.. could not receive emails from google some kind TLS error cant remember but there are paths changed to crt files. After fixed that in config had to change user from clam to root because clam could not scan any mail. Then I got that error since nothing with permissions didnt help I changed name of log file in config. Try that and see

Regards

Offline
*
Re: CLAMAV update problem
« Reply #14 on: December 08, 2016, 09:06:18 AM »
Where exactly in the config did you go to change the path ?? I am having the same issue. I also have an issue with dovecot that points to wrong path. I can manually edit the .conf files but everytime i rebuild or restart mail services, the old config that points to wrong certificate comes back.  >:(

why don't you simply enter your certificate data into the files which is used by default ?
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services