Setting up ScanonAccess Clamav - help thanks

I have a question regarding ClamAV ScanOnAccess.

I folowed directions adding what I need to the clamd.conf file and to simplify it, just scan my downloads directory where I added the eicar.txt file.

However, when I cat the file, it still showed me whats inside. It is suppose to not give me permission to open it.

So, I use Braves AI chat and it told me to type in this: grep FANOTIFY /boot/config-$(uname -r)

Which I get: CONFIG_FANOTIFY=y
CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y

Which is actually what I am suppose to get. Still noting

I reset the daemon and the clamonacc I was told to do and yet nothing.

Funny thing is, When I actually do a clamscan in the Directory, It picks it up as a virus.

I am trying to get clamav to immediately pick up the virus and not let me access it.

Clamav says thats what its suppose to do but, not working.

Any ideas?

Here is my config file if needed:

#Automatically Generated by clamav-daemon postinst
#To reconfigure clamd run #dpkg-reconfigure clamav-daemon
#Please read /usr/share/doc/clamav-daemon/README.Debian.gz for details
LocalSocket /var/run/clamav/clamd.ctl
FixStaleSocket true
LocalSocketGroup clamav
LocalSocketMode 666

TemporaryDirectory is not set to its default /tmp here to make overriding

the default with environment variables TMPDIR/TMP/TEMP possible

User clamav
ScanMail true
ScanArchive true
ArchiveBlockEncrypted false
MaxDirectoryRecursion 15
FollowDirectorySymlinks false
FollowFileSymlinks false
ReadTimeout 180
MaxThreads 12
MaxConnectionQueueLength 15
LogSyslog false
LogRotate true
LogFacility LOG_LOCAL6
LogClean false
LogVerbose false
PreludeEnable no
PreludeAnalyzerName ClamAV
DatabaseDirectory /var/lib/clamav
OfficialDatabaseOnly false
SelfCheck 3600
Foreground false
Debug false
ScanPE true
MaxEmbeddedPE 10M
ScanOLE2 true
ScanPDF true
ScanHTML true
MaxHTMLNormalize 10M
MaxHTMLNoTags 2M
MaxScriptNormalize 5M
MaxZipTypeRcg 1M
ScanSWF true
ExitOnOOM false
LeaveTemporaryFiles false
AlgorithmicDetection true
ScanELF true
IdleTimeout 30
CrossFilesystems true
PhishingSignatures true
PhishingScanURLs true
PhishingAlwaysBlockSSLMismatch false
PhishingAlwaysBlockCloak false
PartitionIntersection false
DetectPUA false
ScanPartialMessages false
HeuristicScanPrecedence false
StructuredDataDetection false
CommandReadTimeout 30
SendBufTimeout 200
MaxQueue 100
ExtendedDetectionInfo true
OLE2BlockMacros false
AllowAllMatchScan true
ForceToDisk false
DisableCertCheck false
DisableCache false
MaxScanTime 120000
MaxScanSize 100M
MaxFileSize 25M
MaxRecursion 16
MaxFiles 10000
MaxPartitions 50
MaxIconsPE 100
PCREMatchLimit 10000
PCRERecMatchLimit 5000
PCREMaxFileSize 25M
ScanXMLDOCS true
ScanHWP3 true
MaxRecHWP3 16
StreamMaxLength 25M
LogFile /var/log/clamav/clamav.log
LogTime true
LogFileUnlock false
LogFileMaxSize 0
Bytecode true
BytecodeSecurity TrustSigned
BytecodeTimeout 60000
OnAccessMaxFileSize 5M
OnAccessPrevention yes
OnAccessExcludeUname clamav
OnAccessIncludePath /home/username/Downloads

ok i have ClamAv installed how i use it is i open a terminal then use sudo clamscan -r /home/(name) then if it see a possible virus i use sudo clamscan -r --remove /home/(name) replace name with computer name i have never gotten the scan on access to work tho

1 Like

Okay. So its not just me. Maybe Zorin 18, I'll have better experience with On Access Scanning. Thanks