Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Clamd Anacron job 'cron.daily'

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
15 posts
  • Previous
  • 1
  • 2
shua
Posts: 10
Joined: Thu Mar 13, 2014 7:12 pm

Re: Clamd Anacron job 'cron.daily'
  • Quote

Post by shua » Wed Nov 19, 2014 5:47 am

ls -l /etc/clamd.conf
-rw-r--r-- 1 root root 14960 Nov 18 2012 /etc/clamd.conf
Top

joem
Posts: 378
Joined: Thu Nov 13, 2014 8:33 am

Os: CentOS 6x
Web: nginx + php-fpm
Re: Clamd Anacron job 'cron.daily'
  • Quote

Post by joem » Wed Nov 19, 2014 5:57 am

Try changing the user from clamav to clam for both freshclam.log clamd.log files.
Top

Shua613
Posts: 5
Joined: Mon Nov 10, 2014 2:08 pm

Re: Clamd Anacron job 'cron.daily'
  • Quote

Post by Shua613 » Wed Nov 19, 2014 2:16 pm

changed chown and chgrp didn't help
I tried sudo service clamd start (adding sudo and that gave me)
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: **************************************************
ERROR: LOCAL: Socket file /var/run/clamav/clamd.sock could not be bound: Permission denied
ERROR: Can't unlink the socket file /var/run/clamav/clamd.sock
[FAILED]
Top

joem
Posts: 378
Joined: Thu Nov 13, 2014 8:33 am

Os: CentOS 6x
Web: nginx + php-fpm
Re: Clamd Anacron job 'cron.daily'
  • Quote

Post by joem » Wed Nov 19, 2014 11:09 pm

Shua613 wrote:changed chown and chgrp didn't help
I tried sudo service clamd start (adding sudo and that gave me)
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: **************************************************
ERROR: LOCAL: Socket file /var/run/clamav/clamd.sock could not be bound: Permission denied
ERROR: Can't unlink the socket file /var/run/clamav/clamd.sock
[FAILED]

Did you reset the user back to clamav or leave them to clam before you ran the command service clamd start?
Top

Shua613
Posts: 5
Joined: Mon Nov 10, 2014 2:08 pm

Re: Clamd Anacron job 'cron.daily'
  • Quote

Post by Shua613 » Thu Nov 20, 2014 1:51 am

see http://zend.to/clamavpermissions.php#permissions
I found the following it worked for me except I needed to change one thing right below here
-rw-r--r-- 1 clamav clamav 1396 Jul 27 07:13 freshclam.log
to
-rw-r--r-- 1 clam clam 1396 Jul 27 07:13 freshclam.log

The following is all based on the line

User clam
appearing in the file /etc/clamd.conf.
/var/log/clamav

To check this, run the command "freshclam" as root. If it produces an error about the log file, make sure the ownership of the directory and the files in it are set as follows:

drwxr-xr-x 2 clamav clamav 4096 Jul 25 11:04 .
drwxr-xr-x 7 root root 4096 Jun 16 04:02 ..
-rw-r--r-- 1 clam clam 11208 Jul 27 14:09 clamd.log
-rw-r--r-- 1 clamav clamav 1396 Jul 27 07:13 freshclam.log
/var/run/clamav

To check this, run the command "service clamd restart" as root. Check that the last entry in the file /var/log/clamav/clamd.log has just been written (they are all timestamped) and see if it produces any errors about the socket file. If it does, then make sure the ownership of the directory and the files in /var/run/clamav are set as follows:

drwxr-xr-x 2 clam clam 4096 Jul 27 13:59 .
drwxr-xr-x 12 root root 4096 Jul 27 13:59 ..
-rw-rw-r-- 1 clam clam 4 Jul 27 13:59 clamd.pid
srw-rw-rw- 1 clam clam 0 Jul 27 13:59 clamd.sockns
Top


Post Reply
  • Print view

15 posts
  • Previous
  • 1
  • 2

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password