No matter which mode, Daemon, Socket,…I chose, ClamAV wouldn’t run.
I keep getting errors.
This has happening in OwnCloud 7 till now.
Ongoing issue at GitHub: https://github.com/owncloud/files_antivirus/issues/98
My server info:
Debian Wheezy
Nginx
–PHP 5.4
–ClamAV installed on host
–NextCloud ClamAV also installed
–Internal storage (data).
Are you guys plan to re-work the code or create a new antivirus in the future release?
Here’s one of the errors:
…
Error while running background job (class: OC\BackgroundJob\Legacy\RegularJob, arguments: Array ( [0] => OCA\Files_Antivirus\Cron\Task [1] => run ) ): {“Exception”:“OCP\Files\NotFoundException”,“Message”:“File with id “4” has not been found.”,“Code”:0,“Trace”:"#0 /media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/apps/files_antivirus/lib/backgroundscanner.php(78): OC\Files\View->getPath(‘4’)\n#1 /media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/apps/files_antivirus/lib/cron/task.php(21): OCA\Files_Antivirus\BackgroundScanner->run()\n#2 [internal function]: OCA\Files_Antivirus\Cron\Task::run()\n#3 /media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/lib/private/backgroundjob/legacy/regularjob.php(31): call_user_func(Array)\n#4 /media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/lib/private/backgroundjob/job.php(52): OC\BackgroundJob\Legacy\RegularJob->run(Array)\n#5 /media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/cron.php(171): OC\BackgroundJob\Job->execute(Object(OC\BackgroundJob\JobList), Object(OC\Log))\n#6 {main}",“File”:"/media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/lib/private/files/view.php",“Line”:1677}
…
…
Error while running background job (class: OC\BackgroundJob\Legacy\RegularJob, arguments: Array ( [0] => OCA\Files_Antivirus\Cron\Task [1] => run ) ): {“Exception”:“OCP\Files\NotFoundException”,“Message”:“File with id “6” has not been found.”,“Code”:0,“Trace”:"#0 /media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/apps/files_antivirus/lib/backgroundscanner.php(78): OC\Files\View->getPath(‘6’)\n#1 /media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/apps/files_antivirus/lib/cron/task.php(21): OCA\Files_Antivirus\BackgroundScanner->run()\n#2 [internal function]: OCA\Files_Antivirus\Cron\Task::run()\n#3 /media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/lib/private/backgroundjob/legacy/regularjob.php(31): call_user_func(Array)\n#4 /media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/lib/private/backgroundjob/job.php(52): OC\BackgroundJob\Legacy\RegularJob->run(Array)\n#5 /media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/cron.php(145): OC\BackgroundJob\Job->execute(Object(OC\BackgroundJob\JobList), Object(OC\Log))\n#6 {main}",“File”:"/media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/lib/private/files/view.php",“Line”:1677} …
Clam AV also not working for me
at other server usage clam av is working without any issue - only in NC error
I get this error at NC 10 beta - Daemon socket mode - php 7 - debian 8 - apache 2.4
OCA\Files_Antivirus\BackgroundScanner::run, exception: An exception occurred while executing 'SELECT fc.fileidFROMoc_filecachefc LEFT JOINoc_files_antivirusfa ON fa.fileid= fc.fileidINNER JOINoc_storagesss ON (fc.storage= ss.numeric_id) AND ((ss.idLIKE 'local::%') OR (ss.idLIKE 'home::%')) WHERE (fc.mimetype<> '2') AND ((fa.fileidIS NULL) OR (fc.mtime> fa.check_time)) AND (fc.pathLIKE 'files/%') AND (fc.size<>0) LIMIT 5': SQLSTATE[42S22]: Column not found: 1054 Unknown column '0' in 'where clause'
UPDATE:
The original fix actually verified my suspicion that the compliled SQL statement was treating this number as a string. Further testing that my fix actually caused another error later on and thus the problem was truly not fixed. After digging into the source code and researching the issue more I discovered that the following works the best:
For those who reading this:
After you downloaded the files and copied it to NC apps directory, ensure to chown -R it to www-data:www-data , and install it.
Then look for the above line that wfunderberg posted, and remove the single quote around ‘0’.