New in CWP Edge / LTSFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers. Available now in the Edge-Latest and LTS-Stable versions. Discuss in the forum

LSPHP / Cache ›
CWP Secure KernelKernel-level protectionEvery site in its own sandbox

Every PHP site, cron job and SSH session runs in its own profile that the kernel enforces. A hacked WordPress cannot read other accounts’ files, and crypto miners and unexpected processes are stopped. Discuss in the forum

Secure Kernel ›
CWP DataCenter PanelFree for CWPpro serversAll your servers on one screen

Manage all your CWP servers from one panel: live health, every hosting account, CWP and OS updates on many servers at once, backups, SSL, firewall and Telegram alerts. Discuss in the forum

DataCenter Panel ›
CWP Backup ServerFree for CWPpro serversBackups that ransomware cannot reach

Protected backups of all your CWP servers on a separate machine. Snapshots a hosting server cannot delete, and restore of files, databases, mail and whole accounts in the admin and user panel. Discuss in the forum

Backup Server ›
WordPress ManagerIncluded & freeWordPress managed from the panel

Install, secure, update, back up and clone WordPress sites without FTP. Updates are tested on a staging clone first and applied to the live site only when they pass, with a backup taken first. Discuss in the forum

WordPress Manager ›
CWP CageIsolationEvery account in its own cage

Per-account isolation built from Linux namespaces and cgroups. A break-in or a runaway script on one site cannot reach another account, the panel or the rest of the server; resource limits per hosting package. Discuss in the forum

CWP Cage ›
Script InstallerOne-click appsWordPress, Joomla, Moodle and more in one click

CWP’s own script installer in the user panel: pick an app, choose the domain and folder, and it is live in seconds with its database and admin login created automatically. Ready for LSPHP and LSAPI-Cache. Discuss in the forum

Script Installer ›
DNS ClusterFor every control panelOne DNS cluster for all your servers

Your servers keep creating domains as usual; the zones are collected into one authoritative PowerDNS cluster you control, with DNSSEC, roles and a full activity trail. Accepts CWP, cPanel, Plesk, DirectAdmin and BIND. Discuss in the forum

DNS Cluster ›
CWP BillingFree to useBilling and support system for hosting providers

Clients, services, invoices, payments, domains, server provisioning and support tickets in one place. All gateways, server modules and registrars are free, with free migration from WHMCS, ClientExec and Blesta. Discuss in the forum

CWP Billing ›
CWPproFrom $1.49 per monthEvery CWP feature unlocked

CWPpro is the professional version of Control Web Panel: all features, unlimited accounts, the latest CWP version and security fixes first. $1.49 per month or $11.99 per year. Discuss in the forum

Get CWPpro ›

[SOLVED] CLAMAV update problem

Started by brinsleyparagao, August 16, 2015, 01:06:44 AM

Previous topic - Next topic

brinsleyparagao

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 ?

zakrpa

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

Igor S.

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

Mamas

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.

infinitech07

#4
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.  ;)

Mamas

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?

Igor S.

Quote from: Mamas on October 18, 2015, 09:50:32 AM

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

CWP.admin:
"Services Config" -> "ChkConfig Manager" -> "Default On"
Command:
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

Administrator

clamav updater is in /scripts folder

Hackaust

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:

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

Igor S.

Hello.

Just run next few commands from SSH:

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

Hackaust

#10
Igor S., i run these commands but receive this error on freshclam:
ERROR: Can't change dir to /var/lib/clamav

When i run "service clamd start" command, i receive the following error:
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

Igor S.

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

crmgddn63

Quote from: Hackaust on February 19, 2016, 04:53:04 AM
Igor S., i run these commands but receive this error on freshclam:
ERROR: Can't change dir to /var/lib/clamav

When i run "service clamd start" command, i receive the following error:
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

dukkha

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.  >:(

Quote from: zakrpa 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

Administrator

Quote from: dukkha 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.  >:(

why don't you simply enter your certificate data into the files which is used by default ?