dave-theunsub / clamtk

An easy to use, light-weight, on-demand virus scanner for Linux systems
https://gitlab.com/dave_m/clamtk/wikis/home
Other
357 stars 46 forks source link

Clamtk and Clamav do not update automatically #127

Open Lehmeiers opened 3 years ago

Lehmeiers commented 3 years ago

I have a problem with clamav 0.103.1-1 and ClamTK 6.06-1.

I use it under Manjaro and I can't get an automatic update. Also, the update and the update times are not saved.

If I start the update manually, it works. When will this bug be fixed?

My system is :

inxi -Fxxxzo System: Kernel: 5.4.100-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.1 Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm4 dm: LightDM 1.30.0 Distro: Manjaro Linux Machine: Type: Desktop System: Dell product: OptiPlex 360 v: N/A serial: Chassis: type: 6 serial: Mobo: Dell model: 0T656F v: A01 serial: BIOS: Dell v: A07 date: 06/18/2012 CPU: Info: Dual Core model: Pentium E5200 bits: 64 type: MCP arch: Penryn rev: 6 L2 cache: 2 MiB flags: lm nx pae sse sse2 sse3 ssse3 bogomips: 9979 Speed: 2178 MHz min/max: N/A Core speeds (MHz): 1: 2178 2: 1794 Graphics: Device-1: NVIDIA GT218 [GeForce 210] driver: nouveau v: kernel bus ID: 01:00.0 chip ID: 10de:0a65 class ID: 0300 Display: x11 server: X.Org 1.20.10 driver: loaded: nouveau unloaded: modesetting alternate: fbdev,nv,vesa resolution: 1680x1050~60Hz s-dpi: 96 OpenGL: renderer: NVA8 v: 3.3 Mesa 20.3.4 direct render: Yes Audio: Device-1: Intel NM10/ICH7 Family High Definition Audio vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:27d8 class ID: 0403 Device-2: NVIDIA High Definition Audio driver: snd_hda_intel v: kernel bus ID: 01:00.1 chip ID: 10de:0be3 class ID: 0403 Device-3: Microsoft LifeCam HD-5000 type: USB driver: snd-usb-audio,uvcvideo bus ID: 2-1:2 chip ID: 045e:076d class ID: 0102 Sound Server: ALSA v: k5.4.100-1-MANJARO Network: Device-1: Broadcom NetLink BCM5784M Gigabit Ethernet PCIe vendor: Dell driver: tg3 v: 3.137 port: dc80 bus ID: 02:00.0 chip ID: 14e4:1698 class ID: 0200 IF: enp2s0 state: down mac: Device-2: Realtek RTL-8100/8101L/8139 PCI Fast Ethernet Adapter driver: 8139too v: 0.9.28 port: cc00 bus ID: 03:00.0 chip ID: 10ec:8139 class ID: 0200 IF: enp3s0 state: up speed: 100 Mbps duplex: full mac: Drives: Local Storage: total: 931.51 GiB used: 494.02 GiB (53.0%) ID-1: /dev/sda vendor: Samsung model: SSD 860 QVO 1TB size: 931.51 GiB speed: rotation: SSD serial: rev: 2B6Q scheme: MBR Partition: ID-1: / size: 287.37 GiB used: 39.78 GiB (13.8%) fs: ext4 dev: /dev/sda2 ID-2: /boot size: 975.9 MiB used: 184 MiB (18.9%) fs: ext4 dev: /dev/sda1 ID-3: /home size: 556.52 GiB used: 453.94 GiB (81.6%) fs: ext4 dev: /dev/sda3 Swap: ID-1: swap-1 type: partition size: 71.13 GiB used: 122.2 MiB (0.2%) priority: -2 dev: /dev/sda4 Unmounted: Message: No Unmounted partitions found. Sensors: System Temperatures: cpu: 41.0 C mobo: N/A gpu: nouveau temp: 42.0 C Fan Speeds (RPM): N/A Info: Processes: 157 Uptime: 4h 02m wakeups: 0 Memory: 3.78 GiB used: 1.98 GiB (52.3%) Init: systemd v: 247 Compilers: gcc: 10.2.0 clang: 11.1.0 Packages: pacman: 2031 Shell: Bash v: 5.1.0 running in: yakuake inxi: 3.3.01

dave-theunsub commented 3 years ago

Hi @Lehmeiers ,

Do you mean signature updates? If so, please update to version 6.09.

https://github.com/dave-theunsub/clamtk/releases/tag/v6.09

respectfully, Dave M

Lehmeiers commented 3 years ago

Thanks for the tip. I have written to the packer for Manjaro to see if he can provide this package in a timely manner, as it will certainly affect more users than just me.

Sincerely, R.Lehmeier

dave-theunsub commented 3 years ago

Hi @Lehmeiers ,

Thank you for reporting the issue and following up. Please keep us up to date and let us know if we can help.

respectfully, Dave M

Lehmeiers commented 3 years ago

I have to thank you and will report back whether it worked or not.

Sincerely, R.Lehmeier

Lehmeiers commented 3 years ago

So I am now using ClamTK 6.09-1 and Clamav 0.103.1-1 in Manjaro.

Unfortunately, the problem is still there. It does not update automatically. Also, the times of the update and the automatic scanning of the files are not saved (at least they are not displayed again when I have closed it once and opened it again).

If I do it manually, it works - but that is not the purpose of a scanner. It is supposed to do its work silently in the background and provide security.

Translated with www.DeepL.com/Translator (free version)

dave-theunsub commented 3 years ago

Hi @Lehmeiers ,

How are you updating manually?

Also, what is the output of grep Update ~/.clamtk/prefs?

respectfully, Dave M

Lehmeiers commented 3 years ago

I go via "Updates => Update" and then update by confirmation so that the process is initiated.

An automatic update via "Updates => Update wizard => My computer automatically receives updates" does not work. Although I set 00:30 under "Scheduler => Set the check time with a 24-hour clock" and set "Select a time at which your signatures should be updated ( 1 hour )".

Updates should be imported at 00:30 and the signatures updated every hour. And confirm these changes by closing.

When I go back to Planner after closing, everything is back to 0 and my entries are not visible.

Is the programme also updated under Manjaro, where the system updates normally go via the package management (Pamac / Octopi)?

I also assume that updates are made up if the computer was switched off at the time entered.

The terminal entry resulted in :

grep Update ~/.clamtk/prefs Update=single

Translated with www.DeepL.com/Translator (free version)

dave-theunsub commented 3 years ago

Hi @Lehmeiers ,

Sorry for the delay. Please try this: open the Scheduler, remove the scheduled update, and re-add it.

respectfully, Dave M

Lehmeiers commented 3 years ago

Screenshot von 2021-03-26 15 34 01 Hello! I have now times ClamTK completely uninstalled and the directory .clamtk also deleted and then reinstalled the whole thing. Unfortunately, is still not updated.

Here is a screenshot.

dave-theunsub commented 3 years ago

Hi @Lehmeiers ,

Did uninstalling clamtk change your crontab?

If you type crontab -l at the command line, it will list what you have scheduled. So, please remove the scan (not the program), re-add it, and see if that works. Sorry if I am not understanding.

respectfully,
Dave M

Lehmeiers commented 3 years ago

I deleted the cron file in the ~/.clamtk/ folder and restarted clamtk, but everything remained as it is. I changed the cron file from 30 0 /usr/bin/clamscan ... to 30 45 /usr/bin/clamscan ... but it is not taken into account.

When I type crontab -l I get : 30 0 * /usr/bin/clamscan --exclude-dir=/home/ralf/.clamtk/viruses --exclude-dir=smb4k --exclude-dir=/run/user/ralf/gvfs --exclude-dir=/home/ralf/.gvfs --exclude-dir=.thunderbird --exclude-dir=. mozilla-thunderbird --exclude-dir=.evolution --exclude-dir=Mail --exclude-dir=kmail -i -r /home/ralf --log="$HOME/.clamtk/history/$(date +\%b-\%d-\%Y).log" 2>/dev/null # clamtk-scan

So updating the signatures doesn't work. Even if I let it run overnight ( 0:35 ? ).

I wonder what happens if it is switched off during the set time - is this done at the next start?

Translated with www.DeepL.com/Translator (free version)

dave-theunsub commented 3 years ago

Hi @Lehmeiers ,

No, I don't think it will run when switched back on. I have not tested that, though.

respectfully,
Dave M

Lehmeiers commented 3 years ago

Hi @Lehmeiers ,

No, I don't think it will run when switched back on. I have not tested that, though.

respectfully, Dave M

What else do I have to do to make it work?

dave-theunsub commented 3 years ago

Hi @Lehmeiers ,

See image: remove from the Scheduler, and re-add.

respectfully, Dave M scheduler1_

Lehmeiers commented 3 years ago

Ok, but I don't have a plus sign when updating the signatures (see red circle). Is it possible that this is why it does not work? How do I get the plus sign back? Screenshot von 2021-04-03 11 41 09_002

Lehmeiers commented 3 years ago

After uninstalling Clamtk and deleting the Clamtk directory in my home folder, I get the following output :

crontab -l

35 0 * /usr/bin/clamscan --exclude-dir=/home/ralf/.clamtk/viruses --exclude-dir=smb4k --exclude-dir=/run/user/ralf/gvfs --exclude-dir=/home/ralf/.gvfs --exclude-dir=.thunderbird --exclude-dir=.mozilla-thunderbird --exclude-dir=.evolution --exclude-dir=Mail --exclude-dir=kmail -i -r /home/ralf --log="$HOME/.clamtk/history/$(date +\%b-\%d-\%Y).log" 2>/dev/null # clamtk-scan

The way I see it, it's the missing button (for whatever reason it's missing). So it seems that the signatures are not updated, even if Clamtk tells me that updates are available.

How do I get it back - or does that not help to get the automatic update going?

dave-theunsub commented 3 years ago

Hi @Lehmeiers ,

Ok, from the command line, do this:

crontab -r

This will delete your scheduled entries.

Now go to the Scheduler and try to re-add.

respectfully, Dave M

Lehmeiers commented 3 years ago

It's still the same problem and the plus sign to add the signature update is still missing.

dave-theunsub commented 3 years ago

Hi @Lehmeiers ,

This is weird! I'm going to play around and see if I can duplicate this. I haven't been able to yet, but I'll try again. This one is hard to figure out. Thank you for being patient and testing things to help diagnose.

respectfully, Dave M

Lehmeiers commented 3 years ago

But always happy to. If you still need data on the system or something, just get in touch. I also want it to work and am glad that the error is not ignored or put on the back burner.

I have Clamtk 6.0.9 from the official Manjaro repositories.

dave-theunsub commented 3 years ago

Hi @Lehmeiers ,

I have good news and bad news. The good news is that I can duplicate the issue now, so I can work on debugging/fixing without posting back a million times. The bad news is... there's an issue. Not sure how or why... there are no error messages.

I'll post back when I have something.

respectfully,
Dave M

Lehmeiers commented 3 years ago

Thanks for the feedback. It is nice that you can now reproduce the error, then perhaps there will soon be a solution and nothing will stand in the way of using Clamtk.

I wish you good luck with the troubleshooting and a big thank you for taking care of the error, even on Easter.

Yours sincerely, R.Lehmeier

dave-theunsub commented 3 years ago

Hi @Lehmeiers ,

Sorry, one more question, and no obligation to answer on Easter, either. Can you tell me if you have the file "freshclam.conf" in your .clamtk directory?

ls ~/.clamtk/db

I think I figured it out. We have to specify the freshclam.conf location. So for me, I'd type:

/usr/bin/freshclam --config-file=/home/dave/.clamtk/db/freshclam.conf --datadir=/home/dave/.clamtk/db --log=/home/dave/.clamtk/db/freshclam.log

and then it seems to work.

respectfully, Dave M

Lehmeiers commented 3 years ago

Great that you found the error. But where do I have to enter like /usr/bin/freshclam --config-file=/home/dave/.clamtk/db/freshclam.conf --datadir=/home/dave/.clamtk/db --log=/home/dave/.clamtk/db/freshclam.log ?

dave-theunsub commented 3 years ago

Hi @Lehmeiers ,

I'll do that part for you. Can you tell me the output of this:

ls -l ~/.clamtk/db

respectfully,
Dave M

Lehmeiers commented 3 years ago

Ok I did it ( you should also enter your own name if your name is not Dave. ;-) ) .

When I type ls -l ~/.clamtk/db I get :

total 218540 -rw-r--r-- 1 ralf ralf 293670 4 Apr 21:16 bytecode.cvd -rw-r--r-- 1 ralf ralf 105614180 4 Apr 21:13 daily.cvd -rw-r--r-- 1 ralf ralf 63 3 Apr 12:35 freshclam.conf -rw-r----- 1 ralf ralf 928 4 Apr 21:16 freshclam.log -rw-r--r-- 1 ralf ralf 117859675 4 Apr 21:16 main.cvd

Hopefully the signatures will be updated now. Even though I couldn't enter a time yet, because the corresponding plus sign is missing.

Translated with www.DeepL.com/Translator (free version)

dave-theunsub commented 3 years ago

Hi @Lehmeiers ,

Excellent. So this should work:

/usr/bin/freshclam --config-file=/home/ralf/.clamtk/db/freshclam.conf --datadir=/home/ralf/.clamtk/db --log=/home/ralf/.clamtk/db/freshclam.log

This is the command clamtk will run. It seems to work for me. So if it works for you, I can release a new version with this fix.

respectfully,
Dave M

Lehmeiers commented 3 years ago

Yes, it worked, but it still lacks the plus sign so I can set times when the signatures are updated. Or is this always done when there is no time set ?

dave-theunsub commented 3 years ago

Hi @Lehmeiers ,

Now that part I can't explain. It is there for the scanning, so it should be there for the signature updates.

Here's something we can try:

  1. Download the attached zip
  2. From the command line, type unzip clamtk-6.11.zip
  3. type cd clamtk-6.11
  4. type ./clamtk
  5. now go to the Scheduler, and see if the + is there.

I want to see if it's a packaging problem, or if it's something else. Although it says 6.11, it's actually just 6.10.

respectfully,
Dave M clamtk-6.11.zip

Lehmeiers commented 3 years ago

I downloaded and unzipped the file and then went into the unzipped directory clamtk-6.11 and started with ./clamtk. The old problem came up again - the plus sign is missing.

dave-theunsub commented 3 years ago

Hi @Lehmeiers ,

Hmm... thanks for trying. I'm not sure what to do with that yet.

The good news is that thanks to your help, I can release an update fixing at least one thing. :) I'll keep thinking on it though.

respectfully, Dave M

Lehmeiers commented 3 years ago

More can not be expected - let's hope that this problem will also be solved.

dave-theunsub commented 3 years ago

Hi @Lehmeiers ,

Please try version 6.11 when you can. It works for me, so hopefully it will for you too. If it works, please close this as solved. Then, if you want, please open a new ticket for the lack of a "+" symbol.

Let me know if you have any questions or comments.

respectfully,
Dave M

Lehmeiers commented 3 years ago

Thanks for the tip. Last time I started clamtk from the directory into which I had unpacked it, but now I don't know into which directory I have to copy the unpacked folder Clamtk-6.11 so that it is started automatically afterwards. Can you tell me where this directory is?

Sincerely R.Lehmeier

dave-theunsub commented 3 years ago

Hi @Lehmeiers ,

You could always just test it for now, and wait for an "official" package to come.

tar xf clamtk-6.11.tar.xz
cd clamtk-6.11
mv lib ClamTk
./clamtk

Also, I'm not sure what you mean by start automatically.

respectfully, Dave M

Lehmeiers commented 3 years ago

When would an official package come?

dave-theunsub commented 3 years ago

That's up to Manjaro packagers, I guess? I'm not sure. I only have images for Debian/Ubuntu, CentOS 7 and 8, RHEL, and some BSDs. That's all I can handle, I'm afraid. With some research, you may be able to find out who that is, and contact them. In the meanwhile, although a little inconvenient, you can use the instructions here.

Also, it's possible they're already working it. Do they keep up with releases? What version do they have available from the repository?

Lehmeiers commented 3 years ago

I have now downloaded the clamtk-6.11.tar.xz from https://github.com/dave-theunsub/clamtk/releases.

Then I followed your instructions:

tar xf clamtk-6.11.tar.xz cd clamtk-6.11 mv lib ClamTk ./clamtk

The result is that 6.09 is still displayed, at least when I look at "About".

The same errors are still made.

Either I am doing something fundamentally wrong or the version number has not been changed from 6.09 to 6.11.

I think it's better to wait for the new version for Manjaro.

Thanks for the help

Translated with www.DeepL.com/Translator (free version)

Ricky-Tigg commented 3 years ago

OS: Fedora 34 | Issue – virus signatures not automatically updated – confirmed in GUI.

$ rpm -qa --queryformat "%{NAME}-%{VERSION}\n" clamav{,-*} clamtk | sort | column
clamav-0.103.2          clamav-lib-0.103.2      clamtk-6.11
clamav-filesystem-0.103.2   clamav-update-0.103.2
dave-theunsub commented 3 years ago

Hi @Ricky-Tigg ,

Please provide additional information. Are you configured for manual or automatic updates? Has this always happened or is it new?

respectfully,
Dave M

Ricky-Tigg commented 3 years ago

Of course to make sense my comment implicitly assumed that the GUI had been configured for automatic updating, which is the default setting as well. I am not in position to claim present issue to be a regression. Last time i used this application was at the release of Fedora 32, for a month. I then relied on those same components and commands that follow to make it work:

# sed -e 's/^Example/#Example/g' \
-e 's/^User.*/User root/g' \
-e 's/^#LocalSocket /LocalSocket /g' \
-e 's/^#LocalSocketGroup.*/LocalSocketGroup clamscan/g' \
-e 's/^#LocalSocketMode /LocalSocketMode /g' \
-e 's/^#FixStaleSocket /FixStaleSocket /g' \
-e 's/^#ExcludePath /ExcludePath /g' \
-i /etc/clamd.d/scan.conf
# systemctl --now enable clamav-{freshclam,clamonacc} clamonacc
# ln -s /etc/clamd.d/scan.conf /etc/clamd.conf
# setsebool -P antivirus_can_scan_system 1
# setsebool -P clamd_use_jit 1
dave-theunsub commented 3 years ago

Hi @Ricky-Tigg ,

It sounds like you're talking about ClamAV and not clamtk. Is this right?

respectfully,
Dave M

Ricky-Tigg commented 3 years ago

GUI (Finnish). Same observations as the one depicted here and their llustrations of GUI translated in German.

dave-theunsub commented 3 years ago

Hi @Ricky-Tigg ,

What is the output of grep Update ~/.clamtk/prefs from the commandline?

respectfully, Dave M

Ricky-Tigg commented 3 years ago
$ localectl | head -1
   System Locale: LANG=fi_FI.UTF-8
$ grep -E '^Update|^Last' ~/.clamtk/prefs
Update=shared
LastInfection=Ei koskaan

Parameter translated into "Ei koskaan" may not be eligible for translation.

dave-theunsub commented 3 years ago

Hi @Ricky-Tigg ,

Please run the command ps -ef |grep freshclam. freshclam needs to be running to update signatures automatically.

respectfully, Dave M

Ricky-Tigg commented 3 years ago
$ ps -ef |grep freshclam
yk          3332    3136  0 12:37 pts/0    00:00:00 grep --color=auto freshclam
dave-theunsub commented 3 years ago

Hi @Ricky-Tigg ,

Ok, the good news is that we found the problem.

Ensure the /etc/freshclam.conf file makes the following change:

# Comment or remove the line below. # Example # <- Must have a "#" at the beginning of the line

sudo systemctl enable freshclam

sudo systemctl start freshclam

respectfully, Dave M

Ricky-Tigg commented 3 years ago
# systemctl enable freshclam && systemctl start freshclam
Failed to enable unit: Unit file freshclam.service does not exist.
dave-theunsub commented 3 years ago

Hi @Ricky-Tigg ,

Looks like you don't have it installed. That's an easy fix:

sudo dnf install clamav-update

How did you install clamtk? If you used the rpms, this should have been pulled in for you.

respectfully, Dave M