Cisco-Talos / clamav-documentation

ClamAV Documentation
https://docs.clamav.net
25 stars 24 forks source link

clamav 0.104.2 failing ctest no 8: freshclam_valgrind #24

Closed 4kmartin closed 2 years ago

4kmartin commented 2 years ago

this is on an amazon ec2 instance running amazon Linux 2 on an arm64 arch. i have followed the steps in the install guide for amazon Linux 2. this is the only failure i get, idk if this is important or not I am enclosing the output of the ctest --rerun-failed --output-on-failure

ctest_failure_freshclam_valgrind.txt .

micahsnyder commented 2 years ago

Hi @4kmartin,

This issue tracker is for issues with the clamav documentation. For clamav issues, please see https://github.com/Cisco-Talos/clamav/issues

I did look at your log, though and have a concern. It appears that you're doing the build under /usr/local/src/. /usr/local is generally owned by the root user and reserved as a place for installing programs. It's not a good place to do builds. You may consider placing the source and build directories in a user owned directory. What tips me off that this is the problem is that the failure appears to be:

Can\'t open freshclam.dat in /usr/local/src/clamav-0.104.2/build/unit_tests/TC-uon3ekuj/database

so I suspect that freshclam doesn't have permission to create new files in /usr/local/src/clamav-0.104.2/build/unit_tests/TC-uon3ekuj/database.

One of the slightly odd behaviors about freshclam is that it will attempt to switch at startup to run as the local clamav user if you initally started as root. So in this case, I think it is doing that and then the clamav user doesn't have permission to create files.

As a side note, it's probably best not to do software builds as the root user, or run any software as the root user, unless you absolutely have to.

I hope this helps. I will close this ticket since this is the wrong issue queue. If you're still having issues, feel free to use the other issue queue. If this helps, it'd be nice to hear back that your issue is solved.

Cheers, Micah