<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Vuko&#039;s Blog &#187; centOS</title>
	<atom:link href="http://blog.vukomir.info/category/linux/centos/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.vukomir.info</link>
	<description># echo &#34;Is your home directory $HOME?&#34;</description>
	<lastBuildDate>Tue, 15 Feb 2011 10:10:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>ClamAV + samba</title>
		<link>http://blog.vukomir.info/2011/01/19/clamav-samba/</link>
		<comments>http://blog.vukomir.info/2011/01/19/clamav-samba/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 22:18:34 +0000</pubDate>
		<dc:creator>Ianculov Vucomir</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[centOS]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu / Debian]]></category>
		<category><![CDATA[antivirus]]></category>
		<category><![CDATA[clamav]]></category>
		<category><![CDATA[samba]]></category>

		<guid isPermaLink="false">http://blog.vukomir.info/?p=353</guid>
		<description><![CDATA[This is a howto on getting samba + clamav  to work on a rpm system First thing first I need do install samba file server and clamav anti-virus, after configurating my samba share i have made 2 directory&#8217;s in /home virus logs the virus folder contains the infected files found during scanning and the logs [...]]]></description>
			<content:encoded><![CDATA[<p>This is a howto on getting samba + clamav  to work on a rpm system</p>
<p>First thing first I need do install samba file server and clamav anti-virus, after configurating my samba share i have made 2 directory&#8217;s in /home</p>
<ol>
<li>virus</li>
<li>logs</li>
</ol>
<p>the virus folder contains the infected files found during scanning and the logs folder contains the report of the scanning witch is send bu email to you.</p>
<p>and added a script in crontab in the root account.</p>
<pre class="brush: shell">

#!/bin/bash
TIME=$(date &#039;+%Y-%m-%d-%T&#039;)
/usr/bin/clamdscan --move /home/virus/quarantine -v /home/samba &amp;gt; /home/logs/samba/dailyscan.$TIME
virus=`cat /home/logs/samba/dailyscan.$TIME | grep &quot;Infected files&quot; | awk &#039;{print $3}&#039;`
virus=`cat /home/logs/samba/dailyscan.$TIME | grep &quot;Total errors:&quot; | awk &#039;{print $3}&#039;`
if [ &quot;$virus&quot; != &quot;0&quot; ]; then
mail -u root -s &quot;Virus on Samba File Server : Hostname `hostname`&quot; you@mail.com &amp;lt;/home/logs/samba/dailyscan.$TIME
else if [ &quot;$error&quot; != &quot;0&quot; ]; then
mail -u root -s &quot;Error on virus scan Interliner.eu: Hostname `hostname`&quot; you@mail.com &amp;lt;/home/logs/samba/dailyscan.$TIME
fi
fi
</pre>
<p>and set the script to run once a day, in my case in 11:00pm, because the businesses it is not in the hours <img src='http://blog.vukomir.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . The reson is that i made it run once a day because it task&#8217;s 2 hours to finish the scanning, You can change this <img src='http://blog.vukomir.info/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.vukomir.info%2F2011%2F01%2F19%2Fclamav-samba%2F&amp;title=ClamAV%20%2B%20samba" id="wpa2a_2"><img src="http://blog.vukomir.info/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.vukomir.info/2011/01/19/clamav-samba/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

