Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hilarious behaviour of --include-dir command for clamscan #836

Open
MarkyMarkDE opened this issue Feb 13, 2023 · 0 comments
Open

hilarious behaviour of --include-dir command for clamscan #836

MarkyMarkDE opened this issue Feb 13, 2023 · 0 comments

Comments

@MarkyMarkDE
Copy link

MarkyMarkDE commented Feb 13, 2023

this is hilarious, why this won't work?

		/usr/bin/clamscan
		     --include-dir="^/home/$SUDO_USER/.thunderbird/Marc/Mail/"
			--recursive="yes" 
			--quiet 
			--infected 
			--alert-broken-media="no" 
			--database="/var/lib/clamav" 
			--log="/var/log/clamav/clamscan.log"
			#--move="/etc/clamav/virusevent.d/Mail"

this should scan only the included path recursive

But when i do this:

		/usr/bin/clamscan 
			"/home/$SUDO_USER/.thunderbird/Marc/Mail/"
			--recursive="yes" 
			--quiet
			--infected
			--alert-broken-media="no"
			--database="/var/lib/clamav"
			--log="/var/log/clamav/clamscan.log"
			#--move="/etc/clamav/virusevent.d/Mail"

OR this - here i want to scan only two folders in path

               /usr/bin/clamscan 
		        --include="^/home/$SUDO_USER/.thunderbird/Marc/extensions/"
                        --include="^/home/$SUDO_USER/.thunderbird/Marc/Mail/"
		        --recursive="yes" 
		        --quiet
		        --infected
		        --alert-broken-media="no"
		        --database="/var/lib/clamav"
		        --log="/var/log/clamav/clamscan.log"
		        #--move="/etc/clamav/virusevent.d/Mail"

it worked well.

Can someone explain what's the reason for this?
Why does --include-dir="PATH" not working similar then without it, as you can see the path to maildir is in both cases absolutely identically.

When i run clamscan with the include-dir command, it scanned a few seconds and results in "no viruses found scanned folders 0" but in this PATH many folders included.

Oh and the var SUDO_USER expanded to the whoami.
My complete ClamAV runs with cronjob for sudo only.

Im Running on Ubuntu 22.04.1 with ClamAV 0.103.6 (26811), no newer version available at present.

regards,
Marc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant