# How to use Antivirus app(clamav)

**URL:** <https://help.nextcloud.com/t/how-to-use-antivirus-app-clamav/31560>\
**Category:** ℹ️ Support\
**Tags:** antivirus, nc13\
**Created:** [May 11, 2018, 5:52am UTC](https://help.nextcloud.com/t/how-to-use-antivirus-app-clamav/31560 "2018-05-11T05:52:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoo3](https://help.nextcloud.com/letter_avatar/zoo3/32/5_5575768a8748004e209b776fc1b2916d.png) [@zoo3](https://help.nextcloud.com/u/zoo3)\
**Post date:** [May 11, 2018, 5:52am UTC](https://help.nextcloud.com/t/how-to-use-antivirus-app-clamav/31560/1 "2018-05-11T05:52:28Z")

</div>

I’m installed antivius app from app store.  
First, in the case of mode is Executable,  
I have been pointed out that there is no /usr/bin/clamscan when I look at the log. But actually there is clamscan there. I can also run clamscan. Do I need to adjust the path in Nextcloud?

> Error no app in context RuntimeException: The antivirus executable could not be found at /usr/bin/clamscan

In the case of Daemon (socket),  
It seems there is no permission of sock. Clamav’s conf file specifies “User root” and “DatabaseOwner root”. I can not start unless clamd@scan is root. Nextcloud is not the root user. In this case, how should it be set?  
I think that this is general knowledge rather than Nextcloud, please let me know.

> RuntimeException: Cannot connect to “/var/run/clamd.scan/clamd.sock”: Permission denied (code 13)

Let Nextcloud users be NC-USER.  
I executed “/var/run/clamd.scan/” against “chown -R NC-USER:root”.  
The error was continued when I changed it, but it seems that the error ceased to appear after a while. Is this method correct?

---

<div class="post-metadata">

**Author:** ![anon99252149](https://help.nextcloud.com/letter_avatar/anon99252149/32/5_5575768a8748004e209b776fc1b2916d.png) [@anon99252149](https://help.nextcloud.com/u/anon99252149)\
**Post date:** [May 11, 2018, 8:17am UTC](https://help.nextcloud.com/t/how-to-use-antivirus-app-clamav/31560/2 "2018-05-11T08:17:56Z")

</div>

[https://docs.nextcloud.com/server/13/admin\_manual/configuration\_server/antivirus\_configuration.html](https://docs.nextcloud.com/server/13/admin_manual/configuration_server/antivirus_configuration.html)

---

<div class="post-metadata">

**Author:** ![zoo3](https://help.nextcloud.com/letter_avatar/zoo3/32/5_5575768a8748004e209b776fc1b2916d.png) [@zoo3](https://help.nextcloud.com/u/zoo3)\
**Post date:** [May 11, 2018, 8:55am UTC](https://help.nextcloud.com/t/how-to-use-antivirus-app-clamav/31560/3 "2018-05-11T08:55:12Z")

</div>

Excuse me, I am seeing it. I have set up ClamAV itself. ClamAV is working normally unless through Nextcloud. Perhaps I can use Daemon(socket). But the question is Executable mode.  
The official manual does not specify what to specify in addition to “/usr/bin/clamscan”. In SSH, I can be executed with clamscan only, or I can be executed with /usr/bin/clamscan. For example, changing to “clamscan” only in the path column to clasmscan can not be executed in Nextcloud as well. Is there any other way to specify ‘clamscan’ in Nextcloud settings?

> The Executable option requires the path to `clamscan` , which is the interactive ClamAV scanning command. Nextcloud should find it automatically.

Nextcloud will automatically search for “it”. Is that about a path? Or is it a virus inspection subject?

---

<div class="post-metadata">

**Author:** ![kimcdow](https://help.nextcloud.com/letter_avatar/kimcdow/32/5_5575768a8748004e209b776fc1b2916d.png) [@kimcdow](https://help.nextcloud.com/u/kimcdow)\
**Post date:** [November 19, 2020, 8:57pm UTC](https://help.nextcloud.com/t/how-to-use-antivirus-app-clamav/31560/5 "2020-11-19T20:57:09Z")

</div>

@zoo3 did you ever figure this out? I have the same issue.

---

<div class="post-metadata">

**Author:** ![zoo3](https://help.nextcloud.com/letter_avatar/zoo3/32/5_5575768a8748004e209b776fc1b2916d.png) [@zoo3](https://help.nextcloud.com/u/zoo3)\
**Post date:** [November 20, 2020, 3:03am UTC](https://help.nextcloud.com/t/how-to-use-antivirus-app-clamav/31560/6 "2020-11-20T03:03:43Z")

</div>

This issue is unresolved because I gave up using ClamAV.

---

<div class="post-metadata">

**Author:** ![kimcdow](https://help.nextcloud.com/letter_avatar/kimcdow/32/5_5575768a8748004e209b776fc1b2916d.png) [@kimcdow](https://help.nextcloud.com/u/kimcdow)\
**Post date:** [November 20, 2020, 3:15am UTC](https://help.nextcloud.com/t/how-to-use-antivirus-app-clamav/31560/7 "2020-11-20T03:15:53Z")

</div>

Did you replace it with anything or just gave up on virus scanning totally?

---

<div class="post-metadata">

**Author:** ![yeboi32](https://help.nextcloud.com/letter_avatar/yeboi32/32/5_5575768a8748004e209b776fc1b2916d.png) [@yeboi32](https://help.nextcloud.com/u/yeboi32)\
**Post date:** [January 29, 2021, 11:51am UTC](https://help.nextcloud.com/t/how-to-use-antivirus-app-clamav/31560/8 "2021-01-29T11:51:10Z")

</div>

The solution is to use it with a tcp socket.

> <https://github.com/nextcloud/nextcloud-snap/issues/951>
>
> Hi,
> I have snap 15 and installed and configure the clamav in snap nextcloud getting the below error of Permission denied.
> {"reqId":"wDDTR1f1W95ZaCBBlzmi","level":3,"time":"March 27,...

Scroll down this page and follow [aaronhuggins]'s reply.

I hope that I made your day!

---

<div class="post-metadata">

**Author:** ![punkyard](https://help.nextcloud.com/user_avatar/help.nextcloud.com/punkyard/32/59179_2.png) [@punkyard](https://help.nextcloud.com/u/punkyard)\
**Post date:** [February 21, 2024, 5:13pm UTC](https://help.nextcloud.com/t/how-to-use-antivirus-app-clamav/31560/9 "2024-02-21T17:13:40Z")

</div>

hi  
is it worth enabling ClamAV in NC if it was installed on the actual server?  
Like, when Cripting is on?

But then shall we keep ClamAV on the server? if we don’t use ftp…?  
But if we do???

thanks for your nice replies :))

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [January 16, 2025, 9:23am UTC](https://help.nextcloud.com/t/how-to-use-antivirus-app-clamav/31560/10 "2025-01-16T09:23:52Z")

</div>


