Clamav permission denied error in nextcloud

Hi,

I have the ubuntu 18.04 and sanp nextcloud 15. I have installed the clamav its seem working fine in ubuntu.

But when I configured in nextcloud its giving the following error

Fatal files_antivirus OCA\Files_Antivirus\BackgroundJob\BackgroundScanner::run, exception: Cannot connect to “/var/run/clamav/clamd.ctl”: Permission denied (code 13) March 28, 2019 11:20:11
Error PHP stream_socket_client(): unable to connect to unix:///var/run/clamav/clamd.ctl (Permission denied) at /var/snap/nextcloud/11891/nextcloud/extra-apps/files_antivirus/lib/Scanner/External.php#41

Please guide how to solve the same.