can not update Clamav virus database
-
- Posts: 301
- Joined: Tue Dec 22, 2015 2:06 pm
can not update Clamav virus database
I saw Clamav virus database updating warning in the log file. So I tried to update the virus database manually:
It seems that some file/directory permission error occurred.
How to solve this ?
Thank you.
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
How to solve this ?
Thank you.
Re: can not update Clamav virus database
Try chmod 775 clamav directory.
-
- Posts: 301
- Joined: Tue Dec 22, 2015 2:06 pm
Re: can not update Clamav virus database
I tried your suggestion, it did not work:
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.
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
Is this a safe way?
Thank you.
Re: can not update Clamav virus database
Why not ?baijianpeng wrote:I tried your suggestion, it did not work:
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.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
Is this a safe way?
Thank you.
I think problem are owener of that dir.
-
- Posts: 301
- Joined: Tue Dec 22, 2015 2:06 pm
Re: can not update Clamav virus database
I checked that directory, the owner is :
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.
Code: Select all
[root@ lib]# ls clam* -dl
drwxr-xr-x 2 775 clamupdate 4096 Mar 16 08:06 clamav
Maybe if I change the owner to correct one, then Clamav will be updated automatically.
Re: can not update Clamav virus database
chown clam:clam ?
-
- Posts: 301
- Joined: Tue Dec 22, 2015 2:06 pm
Re: can not update Clamav virus database
Correct!
Thank you!
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
Re: can not update Clamav virus database
Thanks, this solved the issue!baijianpeng wrote: ↑Thu Mar 17, 2016 10:11 amCorrect!Thank you!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
-
- Posts: 7
- Joined: Sat Nov 06, 2021 6:03 pm
- Contact:
- Os: Debian 8x
- Web: nginx + php-fpm
Re: can not update Clamav virus database
I suppose that you cannot update clamav database due to it being locked by running daemon. Presumably Ubuntu proceeds with an automatic update.