Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Dev Section 3rd Party Software
  • Search

can not update Clamav virus database

Section with additional software for Vesta
Post Reply
  • Print view
Advanced search
9 posts • Page 1 of 1
baijianpeng
Posts: 301
Joined: Tue Dec 22, 2015 2:06 pm

can not update Clamav virus database
  • Quote

Post by baijianpeng » Tue Mar 15, 2016 10:13 am

I saw Clamav virus database updating warning in the log file. So I tried to update the virus database manually:

Code: Select all

[root@ ~]# sudo freshclam
ERROR: Can't create temporary directory /var/lib/clamav/clamav-9cf77befbabaa420357e9f96c9845c29.tmp
Hint: The database directory must be writable for UID 1001 or GID 1001
It seems that some file/directory permission error occurred.

How to solve this ?

Thank you.
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: can not update Clamav virus database
  • Quote

Post by skamasle » Tue Mar 15, 2016 9:38 pm

Try chmod 775 clamav directory.
Top

baijianpeng
Posts: 301
Joined: Tue Dec 22, 2015 2:06 pm

Re: can not update Clamav virus database
  • Quote

Post by baijianpeng » Wed Mar 16, 2016 12:05 am

I tried your suggestion, it did not work:

Code: Select all

[root@ ~]# chmod 775 /var/lib/clamav/
[root@ ~]# sudo freshclam
ERROR: Can't create temporary directory /var/lib/clamav/clamav-b66cc590377020bed528d61f99a29b2e.tmp
Hint: The database directory must be writable for UID 1001 or GID 1001
But your idea inspired me. I changed permission to 777, then the virus database can be updated. After updating finished, I changed the permission back to 755.

Is this a safe way?

Thank you.
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: can not update Clamav virus database
  • Quote

Post by skamasle » Wed Mar 16, 2016 7:15 pm

baijianpeng wrote:I tried your suggestion, it did not work:

Code: Select all

[root@ ~]# chmod 775 /var/lib/clamav/
[root@ ~]# sudo freshclam
ERROR: Can't create temporary directory /var/lib/clamav/clamav-b66cc590377020bed528d61f99a29b2e.tmp
Hint: The database directory must be writable for UID 1001 or GID 1001
But your idea inspired me. I changed permission to 777, then the virus database can be updated. After updating finished, I changed the permission back to 755.

Is this a safe way?

Thank you.
Why not ?

I think problem are owener of that dir.
Top

baijianpeng
Posts: 301
Joined: Tue Dec 22, 2015 2:06 pm

Re: can not update Clamav virus database
  • Quote

Post by baijianpeng » Thu Mar 17, 2016 12:46 am

I checked that directory, the owner is :

Code: Select all

[root@ lib]# ls clam* -dl
drwxr-xr-x 2 775 clamupdate 4096 Mar 16 08:06 clamav
According to former warning message, it should be "writable for UID 1001 or GID 1001". But I don't know how to change the owner to UID 1001 or GID 1001.

Maybe if I change the owner to correct one, then Clamav will be updated automatically.
Top

pandabb
Posts: 192
Joined: Sat Aug 08, 2015 3:03 am

Re: can not update Clamav virus database
  • Quote

Post by pandabb » Thu Mar 17, 2016 6:54 am

chown clam:clam ?
Top

baijianpeng
Posts: 301
Joined: Tue Dec 22, 2015 2:06 pm

Re: can not update Clamav virus database
  • Quote

Post by baijianpeng » Thu Mar 17, 2016 10:11 am

Correct!

Code: Select all

[root@  ~]# chown clam:clam /var/lib/clamav/
[root@  ~]# sudo freshclam
ClamAV update process started at Thu Mar 17 18:10:41 2016
Thank you!
Top

thunder1
Posts: 5
Joined: Tue Feb 04, 2014 9:52 pm

Re: can not update Clamav virus database
  • Quote

Post by thunder1 » Mon Aug 30, 2021 8:04 am

baijianpeng wrote: ↑
Thu Mar 17, 2016 10:11 am
Correct!

Code: Select all

[root@  ~]# chown clam:clam /var/lib/clamav/
[root@  ~]# sudo freshclam
ClamAV update process started at Thu Mar 17 18:10:41 2016
Thank you!
Thanks, this solved the issue!
Top

Ankyurtgtgtg
Posts: 7
Joined: Sat Nov 06, 2021 6:03 pm
Contact:
Contact Ankyurtgtgtg
Website

Os: Debian 8x
Web: nginx + php-fpm
Re: can not update Clamav virus database
  • Quote

Post by Ankyurtgtgtg » Sun Nov 07, 2021 5:31 pm

I suppose that you cannot update clamav database due to it being locked by running daemon. Presumably Ubuntu proceeds with an automatic update.
Top


Post Reply
  • Print view

9 posts • Page 1 of 1

Return to “3rd Party Software”



  • 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