store | blogs | forums | twitter | facebook | wiki | downloads | support portal
Atomic Secure Linux
It is currently Sun Aug 18, 2019 5:08 pm

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Plesk 12 and ClamAV - Help!
Unread postPosted: Mon Nov 24, 2014 7:27 pm 
Offline
Forum Regular
Forum Regular

Joined: Mon Mar 10, 2008 9:12 pm
Posts: 512
Location: Southampton, UK
Hi all,

I've got a Plesk 12 box installed and running on Digital Ocean using CentOS 6.5 64bit.

I've installed Qmail Scanner and Spamassassin via Plesk's "Updates and Upgrades" section, and I installed ClamAV using the
Code:
yum install clamd
command in terminal. Unlike the last time I did this, it doesn't want to work out the box. The initial errors of:

Code:
ERROR: Please edit example config file /etc/freshclam.conf
ERROR: Can't open/parse the config file /etc/freshclam.conf


I fixed by commenting Example out in the freshclam.conf and clamd.conf files. But it seems like nothing is configured, and I'm getting lost. I'm not Linux guru.

Last time I did this in Plesk 8.6 it was configured out of the box, but that doesn't seem to be the case now. HELP!

_________________
Matt

"Given that God is infinite, and that the universe is also infinite... would you like a toasted teacake?"

about.me/mattauckland
twitter.com/mattauckland


Top
 Profile  
Reply with quote  
 Post subject: Re: Plesk 12 and ClamAV - Help!
Unread postPosted: Tue Nov 25, 2014 4:42 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Jul 15, 2008 2:38 pm
Posts: 805
Location: Sweden
Hm, I usually use the atomic repository for clamav. asl -s -f usually fixes any misconfiguration.


Top
 Profile  
Reply with quote  
 Post subject: Re: Plesk 12 and ClamAV - Help!
Unread postPosted: Tue Nov 25, 2014 7:29 pm 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Thu Dec 09, 2004 11:19 am
Posts: 2321
If you don't have ASL on this system, I think you need to add some configuration stuff to clamd.conf and freshclam.conf rather than just commenting things out - they don't work out of the box.

I just copied what I had from a box that I knew worked. I'm afraid I don't recall exactly what I added, but it was things like file locations, users and so on.

This also applies even to the clamd version you get when you enable the project gamera repo.

I'm not sure that using the Parallels spamassassin is a good idea (doesn't it conflict with qmail-scanner or something?), and I had no idea they had a qmail-scanner rpm. Did they really come from the parallels repo?

_________________
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>


Top
 Profile  
Reply with quote  
 Post subject: Re: Plesk 12 and ClamAV - Help!
Unread postPosted: Tue Nov 25, 2014 7:49 pm 
Offline
Forum Regular
Forum Regular

Joined: Mon Mar 10, 2008 9:12 pm
Posts: 512
Location: Southampton, UK
Yes faris, it's available only on Plesk 12 I believe.

I've kinda worked it out with some help from the Plesk forums (Here: http://forum.sp.parallels.com/threads/clamav-and-plesk-12-help.328851/#post-768579)

Just incase anyone else has the same issue as me, this is what I did starting with Plesk's Qmail and Spamassassin installed via the control panel. If ye forum gurus spot anything I left out, or a mistake I made, please let me know. Its the only way we learn :)

Next, from terminal I ran yum install clamd followed by yum install qmail-scanner.

At this stage clamd won't work out of the box. When you run the freshclam command for the first time you'll get this error:

Code:
# freshclam
ERROR: Please edit the example config file /etc/freshclam.conf
ERROR: Can't open/parse the config file /etc/freshclam.conf


So you need to edit the /etc/freshclam.conf file and comment out the word Example. Then when you re-run the freshclam command this error will come up:

Code:
# freshclam
ERROR: Can't create temporary directory /var/clamav/clamav-f6df56085fdcc627fea887a8a0c30c1d.tmp
Hint: The database directory must be writable for UID 492 or GID 494

# ERROR: Can't create temporary directory /var/clamav/clamav-f6df56085fdcc627fea88


So to fix this you need to set the permissions for writing to that folder, to the user qscand using this command, replacing UID and GID with the ones displayed in your error message:

Code:
# chown -R UID:GID /var/clamav
# chmod -R 755 /var/clamav


Ok, third time of running the freshclam command is the charm, although you might see these errors during the first database update:

Code:
ClamAV update process started at Tue Nov 25 17:56:12 2014
main.cvd is up to date (version: 55, sigs: 2424225, f-level: 60, builder: neo)
ERROR: Can't open /var/clamav/mirrors.dat for writing
Downloading daily-19680.cdiff [100%]
ERROR: Can't open /var/clamav/mirrors.dat for writing
daily.cld updated (version: 19680, sigs: 1274659, f-level: 63, builder: neo)
bytecode.cvd is up to date (version: 242, sigs: 46, f-level: 63, builder: dgoddard)
ERROR: Can't open /var/clamav/mirrors.dat for writing
Database updated (3698930 signatures) from db.us.clamav.net (IP: 194.8.197.22)


But don't worry, that is only because those files don't exist yet, until freshclam runs for the first time.

Next you need to run the service clamd start command, which will bring up this error:

Code:
# service clamd start
Starting Clam AntiVirus Daemon: ERROR: Please edit the example config file /etc/clamd.conf
ERROR: Can't open/parse the config file /etc/clamd.conf
                                                           [FAILED]


Again to fix this, you need to edit the /etc/clamd.conf file and comment out the word Example. Also locate the line TCPSocket 3310 and uncomment it. That will help you avoid this error:

Code:
# service clamd start
Starting Clam AntiVirus Daemon: ERROR: Please define server type (local and/or TCP).
                                                           [FAILED]


After that, to finish the install I ran the following commands:

Code:
# chkconfig clamd on
# freshclam -d -c 2
# qmail-scanner-reconfigure
Reconfiguring spamassassin settings: Done
Reconfiguring clamav settings: Done
Configuring qmail-scanner: OK


And that, he says fingers crossed, should do it.

Incidentally, I haven't changed anything else in the standard out-of-the-box configuration files. Mostly because I have no-idea what most of it does.

_________________
Matt

"Given that God is infinite, and that the universe is also infinite... would you like a toasted teacake?"

about.me/mattauckland
twitter.com/mattauckland


Top
 Profile  
Reply with quote  
 Post subject: Re: Plesk 12 and ClamAV - Help!
Unread postPosted: Wed Nov 26, 2014 10:50 am 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 8329
Location: earth
There is also this: https://github.com/Atomicorp/atomic-scanner

a plesk module we wrote a ways back to let you configure clam & spamassassin. It is AGPL'd and could use the love. It would be a great place to stick in any automatic configuration setup for clam/freshclam


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group