Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Amavis Permission denied running ClamScan
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
lostinspace2011
Apprentice
Apprentice


Joined: 09 Sep 2005
Posts: 230

PostPosted: Tue Feb 04, 2020 12:46 pm    Post subject: Amavis Permission denied running ClamScan Reply with quote

Since upgrading to latest I am getting the following error:
amavis[19778]: (19778-03-4) rw_loop read 102 chars< /var/amavis/tmp/amavis-20200204T202012-19778-STRylE_X/parts: lstat() failed: Permission denied. ERROR\n

I tried running the "/usr/bin/clamscan --stdout --no-summary -r --tempdir=/var/amavis/tmp /var/amavis/tmp/amavis-..../parts" command and it completed successfully using the amavis user account

Running clamscan in this manor was very slow indeed. Not sure if this was expected.

I checked that the amavis user has access tothe /var/amavis/tmp... directory structure

Any pointers what could be the problem and how I can diagnose this further.

Quote:
amavis[19778]: (19778-03-4) ClamAV-clamd: Sending CONTSCAN /var/amavis/tmp/amavis-20200204T202012-19778-STRylE_X/parts\n to socket /var/run/clamav/clamd.sock
amavis[19778]: (19778-03-4) rw_loop: needline=0, flush=1, wr=1, timeout=10
amavis[19778]: (19778-03-4) rw_loop: sending 69 chars
amavis[19778]: (19778-03-4) rw_loop sent 69> CONTSCAN /var/amavis/tmp/amavis-20200204T202012-19778-STRylE_X/parts\n
amavis[19778]: (19778-03-4) get_deadline ask_daemon_internal_scan - deadline in 479.9 s, set to 288.000 s
amavis[19778]: (19778-03-4) prolong_timer ask_daemon_internal_scan: timer 288, was 10, deadline in 479.9 s
amavis[19778]: (19778-03-4) rw_loop: needline=0, flush=0, wr=0, timeout=287.997
amavis[19778]: (19778-03-4) rw_loop: receiving
amavis[19778]: (19778-03-4) rw_loop read 102 chars< /var/amavis/tmp/amavis-20200204T202012-19778-STRylE_X/parts: lstat() failed: Permission denied. ERROR\n
amavis[19778]: (19778-03-4) rw_loop: needline=0, flush=0, wr=0, timeout=287.997
amavis[19778]: (19778-03-4) rw_loop: receiving
amavis[19778]: (19778-03-4) rw_loop read: got eof
amavis[19778]: (19778-03-4) get_deadline ask_daemon_internal - deadline in 479.9 s, set to 288.000 s
amavis[19778]: (19778-03-4) prolong_timer ask_daemon_internal: timer 288, was 288, deadline in 479.9 s
amavis[19778]: (19778-03-4) get_deadline run_av_3 - deadline in 479.9 s, set to 288.000 s
amavis[19778]: (19778-03-4) prolong_timer run_av_3: timer 288, was 288, deadline in 479.9 s
amavis[19778]: (19778-03-4) run_av (ClamAV-clamd) result: /var/amavis/tmp/amavis-20200204T202012-19778-STRylE_X/parts: lstat() failed: Permission denied. ERROR\n
amavis[19778]: (19778-03-4) (!)run_av (ClamAV-clamd) FAILED - unexpected , output="/var/amavis/tmp/amavis-20200204T202012-19778-STRylE_X/parts: lstat() failed: Permission denied. ERROR\n"
amavis[19778]: (19778-03-4) (!)ClamAV-clamd av-scanner FAILED: CODE(0x556c022c3668) unexpected , output="/var/amavis/tmp/amavis-20200204T202012-19778-STRylE_X/parts: lstat() failed: Permission denied. ERROR\n" at (eval 85) line 951.
amavis[19778]: (19778-03-4) (!)WARN: all primary virus scanners failed, considering backups
amavis[19778]: (19778-03-4) invoking av-scanner ClamAV-clamscan
amavis[19778]: (19778-03-4) run_av (ClamAV-clamscan): query template(0,1): --stdout --no-summary -r --tempdir=/var/amavis/tmp {}
amavis[1977
Back to top
View user's profile Send private message
lostinspace2011
Apprentice
Apprentice


Joined: 09 Sep 2005
Posts: 230

PostPosted: Tue Feb 04, 2020 5:34 pm    Post subject: Reply with quote

The following seems to fix the problem:

Code:
usermod -a -G clamav amavis
usermod -a -G amavis clamav


https://askubuntu.com/questions/604446/how-to-fix-amvavis-reporting-permission-denied-for-clamav
Back to top
View user's profile Send private message
lostinspace2011
Apprentice
Apprentice


Joined: 09 Sep 2005
Posts: 230

PostPosted: Wed Jan 27, 2021 3:52 pm    Post subject: Reply with quote

https://z-issue.com/wp/amavisd-crashes-immediately-on-start-with-little-in-the-logs/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum