I can't seem to get this thing to work, some permission problem maybe, but i can't even run clamdscan normally form console with root the result is always Permission denied. for example i create a file test.txt (eicar file) in /tmp and execute "clandscan /tmp/test.txt" in console logged in as root and i get "/tmp/test.txt: Access denied. ERROR ". The clamd demon is running with user clamav could that be the reason? Now i want to scan the same file (/tmp/test.txt) via php , so i run (i have chowned the file to apache:apache )

$cmd="clamdscan /tmp/test.txt";

i get error 127 i try with the full path of the command /usr/bin/clamdscan i get error 126 (command is found but is not executable), this means that apache doesn't have the permission to execute /usr/bin/clamdscan ? what could be the problem?

migrated from stackoverflow.com Dec 14 '12 at 23:49

This question came from our site for professional and enthusiast programmers.

  • Does /usr/bin/clamdcscan have execute flag set? Root won't run a program if there's no execute mode on it. – Barmar Dec 14 '12 at 18:44
  • yes it has +x set – Nikola Dec 14 '12 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.