-
Senior Member
registered user
Knoppix deletes ClamAV log files - Impossible updates
I installed ClamAV in Knoppix on USB with persistent changes to use as a tool of repairing windows drives. Unfortunately after every boot /var/log/clamav folder is been deleted and it contains the freshclam.log file without which freshclam gives an error message and update is impossible. I have to manually recreate clamav folder and log file to update the anti-virus. I think it has something to do with syslog-knoppix.conf or syslog.conf but I am not sure how to fix this problem. If anyone has any ideas - Please help
-

Originally Posted by
mecho
I installed ClamAV in Knoppix on USB with persistent changes to use as a tool of repairing windows drives. Unfortunately after every boot /var/log/clamav folder is been deleted and it contains the freshclam.log file without which freshclam gives an error message and update is impossible. I have to manually recreate clamav folder and log file to update the anti-virus. I think it has something to do with syslog-knoppix.conf or syslog.conf but I am not sure how to fix this problem. If anyone has any ideas - Please help
The places you mention seem like fertile ground for searching out the flaw. You can also put the actions you mentioned doing repeatedly, i.e.
Code:
mkdir /var/log/clamav
in a script that runs on bootup, e.g. /etc/rc.local, which was mentioned in this thread as a place to put such.
Hope that helps!
Krishna
-
Another thread that relates to the location for running scripts on bootup is here, for your viewing pleasure.
Cheers!
-
Senior Member
registered user
Thank you Krishna - I was thinking about this solution myself. I have a few scripts running at boot of my own, but I dont know how to write the script which creates /var/log/clamav/freshclam.log and makes the CLAMAV as an OWNER and GROUP ID of the folder and the file in it. If freshclam.log is with root as owner and group id freshclam still won't update
-
Senior Member
registered user
Solved :)
Problem SOLVED
The solution is - Copy /var/log/clamav and /var/run/clamav into a new location which has persistence like /home. Before you copy check the original permissions of owner and group of both folders and files inside and memorize them, then restore the same permissions in the new location. When this is done edit /etc/clamav/clamd.conf and /etc/clamav/freshclam.conf and modify all instances in this files which point to the old location to point to the new persistent one. That's it - hope its helpful to anyone.
freshclam works like a charm
-
Senior Member
registered user
Same can be achieved by running: dpkg-reconfigure clamav-base
and following the step-by-step set-up.This will probably avoid the permissions misconfiguration. Did not try it though
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Intel 4th Gen Core i7-4790 SR1QF 3.60GHz (Turbo 4.00GHz) 8M 4-Core LGA-1150 CPU
$39.99

Intel Core i7-9700 3.0 GHz Octo-Core (SRG13) Processor
$79.00

Intel Core i7-9700 3.0 GHz 8 Core Processor
$85.00

Gaming PC: Ryzen 5 3600XT, 16GB RAM DDR4, 512GB NVME SSD GEN 3, 1660Ti Super
$600.00

Intel Core i7-7700T 2.9GHz 8MB Socket LGA1151 Quad Core Processor SR339
$39.99

Intel i7-8700 Coffee Lake 3.2GHz 6-Core Max Turbo 4.6GHz Processor
$69.99

Intel Core i5-6500 Processor (3.2GHz, 4 Core, LGA1151 Socket) - SR2L6
$10.00

Intel Core i7-9700 SRG13 3.0 GHz Desktop CPU
$80.00

Lot of 10 Intel Core i5-4570 3.20GHz Quad-Core LGA1150 Desktop CPU Processors
$259.97

Intel 6th Gen Core i7-6700K 4.0GHz (Turbo 4.2GHz) 4-Core LGA1151 CPU SR2L0
$38.00