LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-21-2013, 01:16 PM   #1
\/4A
Member
 
Registered: Aug 2012
Posts: 118

Rep: Reputation: Disabled
Using Linux as a Virus Prevention for Windows PC's


Hi,

A friend has a small printing press and uses Windows PC's for making their artworks. Their clients bring designs on flash disks and for this reason they're always having problems with viruses even though having regular updates of their anti-virus.

I suggested they place one Linux PC which they would use to scan and clear (all virus threats) all incoming flash disks with ClamAV before inserting them into any of the Windows PC's.

For this reason I've setup a PC with Fedora 19 (Gnome) and installed ClamAV.

I'm trying to update ClamAV but experience the following error:
Code:
[graphic@localhost ~]$ sudo freshclam
ERROR: Can't create temporary directory /var/lib/clamav/clamav-2fb4c1db1706cd9384187cdfa60f7bd4.tmp
Hint: The database directory must be writable for UID 990 or GID 988
Would really appreciate some help on this, pls.
 
Old 11-21-2013, 01:25 PM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
can you show us the output of:
Code:
stat /var/lib/clamav/
 
Old 11-21-2013, 01:28 PM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
As the error message states, freshclam tries to write to /var/lib/clamav/ as an unprivileged user with the UID 990 and the GID 988. To do that either the user with that ID or the group with that ID have to have write access to that directory, which seems not to be the case on your system. Just change the ownership of that directory, for example with
Code:
sudo chown 990:988 /var/lib/clamav
 
1 members found this post helpful.
Old 11-21-2013, 02:09 PM   #4
\/4A
Member
 
Registered: Aug 2012
Posts: 118

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by schneidz View Post
can you show us the output of:
Code:
stat /var/lib/clamav/
Thanks. Here's the result:
Code:
  File: ‘/var/lib/clamav/’
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: fd01h/64769d	Inode: 1310887     Links: 2
Access: (0755/drwxr-xr-x)  Uid: (   64/ UNKNOWN)   Gid: (   64/ UNKNOWN)
Context: system_u:object_r:antivirus_db_t:s0
Access: 2013-10-09 07:28:47.000000000 -0400
Modify: 2013-11-21 13:12:30.262520471 -0500
Change: 2013-11-21 14:04:22.078393657 -0500
 Birth: -
[graphic@localhost ~]$
 
Old 11-21-2013, 02:12 PM   #5
\/4A
Member
 
Registered: Aug 2012
Posts: 118

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TobiSGD View Post
As the error message states, freshclam tries to write to /var/lib/clamav/ as an unprivileged user with the UID 990 and the GID 988. To do that either the user with that ID or the group with that ID have to have write access to that directory, which seems not to be the case on your system. Just change the ownership of that directory, for example with
Code:
sudo chown 990:988 /var/lib/clamav
Thanks. It works.
It did however give some warnings though:
Code:
[graphic@localhost ~]$ sudo freshclam
ClamAV update process started at Thu Nov 21 15:09:57 2013
main.cvd is up to date (version: 55, sigs: 2424225, f-level: 60, builder: neo)
WARNING: getfile: daily-17942.cdiff not found on remote server (IP: 130.59.10.36)
WARNING: getpatch: Can't download daily-17942.cdiff from database.clamav.net
WARNING: getfile: daily-17942.cdiff not found on remote server (IP: 193.1.193.64)
WARNING: getpatch: Can't download daily-17942.cdiff from database.clamav.net
WARNING: getpatch: Can't download daily-17942.cdiff from database.clamav.net
WARNING: Incremental update failed, trying to download daily.cvd
Downloading daily.cvd [100%]
daily.cvd updated (version: 18143, sigs: 527027, f-level: 63, builder: jesler)
Downloading bytecode.cvd [100%]
bytecode.cvd updated (version: 233, sigs: 44, f-level: 63, builder: dgoddard)
Database updated (2951296 signatures) from database.clamav.net (IP: 130.59.10.36)
[graphic@localhost ~]$ sudo freshclam
ClamAV update process started at Thu Nov 21 15:10:35 2013
main.cvd is up to date (version: 55, sigs: 2424225, f-level: 60, builder: neo)
daily.cvd is up to date (version: 18143, sigs: 527027, f-level: 63, builder: jesler)
bytecode.cvd is up to date (version: 233, sigs: 44, f-level: 63, builder: dgoddard)
[graphic@localhost ~]$
 
Old 11-21-2013, 02:15 PM   #6
\/4A
Member
 
Registered: Aug 2012
Posts: 118

Original Poster
Rep: Reputation: Disabled
How can I configure ClamAV in such a way that when a virus (or threat) is discovered in a flash disk, it repairs (or removes the virus) and not the (infected) file itself?
I'm fearing that their client could bring an infected file and ClamAV would end up deleting the file (GOSH, that would be terrible).
 
Old 11-21-2013, 02:32 PM   #7
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
not sure... would making a dd image of the drive before-hand make sense ?
 
Old 11-22-2013, 12:34 AM   #8
\/4A
Member
 
Registered: Aug 2012
Posts: 118

Original Poster
Rep: Reputation: Disabled
Don't think anything techie would be possible - they're just being introduced to Linux and anything techie would put them off.

It's really funny that ClamAV just deletes infected files instead of repairing them (or have I been given wrong info?)
 
Old 11-24-2013, 01:12 AM   #9
\/4A
Member
 
Registered: Aug 2012
Posts: 118

Original Poster
Rep: Reputation: Disabled
I just did a scan of an infected USB Flash and guess what. ClamAV said it was clean even though I updated ClamAV's virus signatures before running the scan.
 
Old 11-24-2013, 04:44 PM   #10
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 572

Rep: Reputation: 120Reputation: 120
Maybe an obvious question (and I don't know the answer to!) but does the linux version of clamav detect windows viruses?
 
Old 11-24-2013, 06:16 PM   #11
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143
Quote:
Originally Posted by devnull10 View Post
Maybe an obvious question (and I don't know the answer to!) but does the linux version of clamav detect windows viruses?
Yes, that's its main use, since Linux virii are almost non-existent.

Quote:
Originally Posted by \/4A View Post
I just did a scan of an infected USB Flash and guess what. ClamAV said it was clean even though I updated ClamAV's virus signatures before running the scan.
As you said before, even the Windows virus scan doesn't catch them either. It could be something that's too new for clam to pick up, just like the Windows AV they're currently using.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows virus detection in Linux Vermont1 General 6 01-16-2012 11:41 AM
I am new to linux and tired of virus' on windows sdupuy Linux - Newbie 5 12-16-2009 11:15 PM
can a windows virus be removed in linux? ShanxT Linux - Security 4 04-14-2007 03:16 AM
Linux Windows virus scanners? NetRAVEN5000 Linux - Software 6 03-26-2006 05:16 PM
Virus prevention, in particular the jpg exploit Whiskers Linux - Security 8 10-05-2004 04:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:56 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