LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-04-2011, 10:36 AM   #1
nebulein
LQ Newbie
 
Registered: Nov 2009
Location: Germany
Distribution: Slackware
Posts: 21

Rep: Reputation: 0
Permissions for clamdscan


Hi,

I am currently trying to set up virus scanning with clamav on my mail server.
I am retrieving the mails for each user seperately with getmail and handling them with procmail and spamassassin. Works fine so far.

No I have installed clamav, configured it and started clamd. It seems to work. The only problem is, that I obviously only can scan files with clamdscan as root. When trying to scan a file as a user I get the following:

Code:
[ben@hermes~]$ clamdscan test.txt
ERROR: Can't connect to clamd: Permission denied

----------- SCAN SUMMARY -----------
Infected files: 0
Total errors: 1
Time: 0.000 sec (0 m 0 s)
(Obviously I also get permission denied when calling clamdscan from procmail, the problem does not seem to be procmail.)
I have read the documentation for clamav and searched the web for quite a while but without any solution. What do I do wrong? I guess I just need user access to clamd.

And, btw. I am quite happy with my mail setup and doing excessive filtering with procmail. That means I don't want to replace it by something else. :-)

OS is Slackware 13.37, Procmail 3.22, Clamav 0.97.2

Any help would be appreciated.


Ben
 
Old 10-04-2011, 11:01 AM   #2
SL00b
Member
 
Registered: Feb 2011
Location: LA, US
Distribution: SLES
Posts: 375

Rep: Reputation: 112Reputation: 112
You're running clamdscan as yourself, which would connect to clamd in order to run the scan. What userid are you running clamd under?

Typically you start clamd under root authority, but set it to run under a service account with a setting in /etc/clamd.conf.
 
Old 10-04-2011, 01:23 PM   #3
nebulein
LQ Newbie
 
Registered: Nov 2009
Location: Germany
Distribution: Slackware
Posts: 21

Original Poster
Rep: Reputation: 0
Thanks for the quick reply.

clamd is started as root and running under clamav. And clamdscan runs as a normal user. (e.g. myself)
 
Old 10-04-2011, 04:07 PM   #4
SL00b
Member
 
Registered: Feb 2011
Location: LA, US
Distribution: SLES
Posts: 375

Rep: Reputation: 112Reputation: 112
Quote:
Originally Posted by nebulein View Post
Thanks for the quick reply.

clamd is started as root and running under clamav. And clamdscan runs as a normal user. (e.g. myself)
That's a typical configuration.

So it seems the solution should be to run clamdscan as clamav. Give yourself sudo access to run the clamdscan command as user clamav, and you should be good to go.
 
Old 10-06-2011, 07:34 AM   #5
nebulein
LQ Newbie
 
Registered: Nov 2009
Location: Germany
Distribution: Slackware
Posts: 21

Original Poster
Rep: Reputation: 0
Thanks, it works with sudo.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
relation between programs permissions and permissions of the files they use rblampain Linux - Security 1 07-10-2011 08:40 PM
[SOLVED] filesystem permissions question - making so user can't change permissions? c0pe Linux - Security 4 07-12-2010 09:06 AM
[SOLVED] Lack basic understanding of permissions(apache permissions problem) cK` Linux - Newbie 7 04-08-2010 11:49 PM
File permissions v. directory permissions Completely Clueless Linux - Newbie 7 07-09-2009 08:33 AM
file permissions OK, but command permissions? stabu Linux - General 2 10-05-2005 12:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration