[clamav-users] clamav error

Michael Orlitzky michael at orlitzky.com
Thu Jun 17 13:41:38 UTC 2021


On 2021-06-17 09:00:09, Jigar via clamav-users wrote:
> Hello,
> 
> Suddenly, we are getting the following error in clamd.log file
> 
> Thu Jun 17 08:52:49 2021 ->
> /var/amavis/tmp/amavis-20210617T083549-04876-63FaXGZk/parts/p001:
> Can't create new file ERROR
> Thu Jun 17 08:52:49 2021 ->
> /var/amavis/tmp/amavis-20210617T083549-04876-63FaXGZk/parts/p002:
> Can't open file or directory ERROR
> 
> We have checked up all the permission and ownership. There is no change in it.
> 

If you are (or can be) using a local socket to communicate with clamd,
then I would suggest changing the way that amavisd invokes the virus
scanner in amavisd.conf:

  # Use clamdscan with the --fdpass option so that the "clamav" user
  # doesn't need to be able to read amavis's private working
  # directory.
  @av_scanners = (
    ['ClamAV-clamdscan', 'clamdscan', "--fdpass --stdout --no-summary {}",
      [0], qr/:.*\sFOUND$/m, qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
  );

This is now the way that amavisd recommends, and assumes that your
clamd socket is writable by the amavis user.


More information about the clamav-users mailing list