From a054e949155dda7d0460d25493ae574454150f8e Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Sat, 11 Jan 2020 16:32:46 +0100 Subject: [PATCH] Change the permissions of /var/lib/clamav so that freshclam can write into it. --- library/roles/clamav/tasks/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/roles/clamav/tasks/main.yml b/library/roles/clamav/tasks/main.yml index 9a5dc50..7c94f0b 100644 --- a/library/roles/clamav/tasks/main.yml +++ b/library/roles/clamav/tasks/main.yml @@ -25,6 +25,9 @@ - name: Install the freshclam configuration template: src=freshclam.conf.j2 dest=/etc/freshclam.conf owner=root group=root mode=0400 + - name: Change the /var/lib/clamav permissions so that freshclam can write into it + file: dest=/var/lib/clamav state=directory owner=clamscan group=clamupdate mode='u=rwx,g=rwsx,o=rx' + - name: Ensure that the clamd service is running and enabled service: name=clamd@scan state=started enabled=yes