1

I am trying to schedule some tasks using ClamAV but it cannot find the find the file that contains the directories I want it to scan.

  *Using sudo doesn't work.
  *The files are set with permissions 644.
  *Files are visible in command line as white.

My goal is to use these lists so that different folders of the server can be scanned during low usage times. I am running this on CentOS 7.

[ENTRY]
#clamscan -r -i –file-list=/home/web_folders.txt --log=/var/log/clamav/clamscan_web.log

[ERROR]
–file-list=/home/web_folders.txt: No such file or directory
WARNING: –file-list=/home/web_folders.txt: Can't access file
NoNo
  • 123
  • 6
  • Are you sure it's `/home/web_folders.txt` and not rather `~/web_folders.txt`? (e.g. your user's home directory?) – digijay Sep 12 '20 at 04:50
  • I did this to test that theory out. I created a folder /var/config and modified the script to clamscan -r -i –file-list=./var/config/web_folders.txt --log=/var/log/clamav/clamscan_web.log Same Issue – NoNo Sep 14 '20 at 20:36

1 Answers1

1

You copied and pasted a Unicode character that looks like a hyphen, but is not actually.

The character you pasted was , which an en dash.

The actual character you should be using is -, which is a plain hyphen as it appears on your keyboard. In this case you should have two of them, i.e. --file-list=...

This is an error in whatever tutorial you were reading. Some content management systems change hyphens into Unicode dashes if they aren't properly escaped in that CMS's editor.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972