[SOLVED]Clamav notify-send not working

Good evening everyone,

I installed clamav with all its packages complete with clamd-daemon. I set scan.conf but I don’t receive the virus-event notification which integrates the following commands:

/etc/clamd.d/virus-event.bash

#!/bin/bash
PATH=/usr/bin
ALERT="Signature detected by clamav: $CLAM_VIRUSEVENT_VIRUSNAME in $CLAM_VIRUSEVENT_FILENAME"

# Send an alert to all graphical users.
for ADDRESS in /run/user/*; do
    USERID=${ADDRESS#/run/user/}
    /usr/bin/sudo -u "#$USERID" DBUS_SESSION_BUS_ADDRESS="unix:path=$ADDRESS/bus" PATH=${PATH} \
        /usr/bin/notify-send -i dialog-warning "Virus found!" "$ALERT"
done

I set setenforce 0 but nothing changes, notifications do not arrive in case of malware download.

How can I solve it?

Good morning, I solved it by setting selinux to disabled and giving the following command:

sudo grubby --update-kernel ALL --remove-args selinux 

Disabling a security feature is hardly a solution, a work around maybe, but not the satisfactory end solution solving the root cause.

I tested the procedure by re-enabling selinux and kernel parameters and giving the following command:

setsebool -P antivirus_can_scan_system 1 

As per the screenshot it now works with enforcing protection enabled.

1 Like