ClamAv MaxDirectoryRecursion

  • Can anyone tell me how to permanently change the ClamAv MaxDirectoryRecursion from the default 15 to 20?

    /etc/clamav/clamd.conf can be manually edited, but OMV will reset it back to 15 when any other WebUI setting change has been applied.

    It can't be added as an Extra option in the OMV WebUI, Services, Antivirus, Settings section, as that adds another MaxDirectoryRecursion entry to /etc/clamav/clamd.conf file.

    Is there or can there be a section added to the /etc/openmediavault/config.xml to make the above change?

  • A very strange coincidence because I have exactly the same issue and planning to post to the forum today with a request to remove the line MaxDirectoryRecursion 15 from the current Openmediavault generated clamd.conf file.


    This particular config line is not not needed because Clamav defaults to a value of 15 when this line is not present. I have actually checked that this is accurate on my raspberry pi NAS setup.




    The current clamd.conf file is as follows :-


    Code
    # This file is auto-generated by openmediavault (https://www.openmediavault.org)
    # WARNING: Do not edit this file, your changes will get lost.
    {snip}
    MaxDirectoryRecursion 15
    {snip}


    Hence the warning that states that this is file is not user configurable by for example editing the file using Nano because it would be over written every time the plugin gets updated.



    It is currently possible to modify the configuration using the extras section of the configuration web page to add a larger value by typing into the extras box MaxDirectoryRecursion 40 which when saved modifies the clamd.conf file to :-


    Code
    # This file is auto-generated by openmediavault (https://www.openmediavault.org)
    # WARNING: Do not edit this file, your changes will get lost.
    {snip}
    MaxDirectoryRecursion 15
    {snip}
    # Extra options
    MaxDirectoryRecursion 40


    Although Clamav will run with this config file, it still uses the first value of 15 and does not pickup the later value of 40.


    If I manually using Nano comment out MaxDirectoryRecursion 15 using #, Clamav then does pickup and use the value of 40 as added using the extras section of the web page.


    Code
    # This file is auto-generated by openmediavault (https://www.openmediavault.org)
    # WARNING: Do not edit this file, your changes will get lost.
    {snip}
    # MaxDirectoryRecursion 15
    {snip}
    # Extra options
    MaxDirectoryRecursion 40



    Hence the requested fix, to modify the Openmediavault script so that the line MaxDirectoryRecursion 15 is not added to clamd.conf.


    Note that there are also other options to correct this issue but all would involve an update to the plugin.

    Raspberry Pi4B 4GB, X829 Dual 2.5" SATA HDD, X708 UPS&PowerMgntHAT18650Batteries, min raspian 32bit, OMV5.x

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!