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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-21-2013, 01:16 PM
|
#1
|
Member
Registered: Aug 2012
Posts: 118
Rep: 
|
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.
|
|
|
11-21-2013, 01:25 PM
|
#2
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
can you show us the output of:
Code:
stat /var/lib/clamav/
|
|
|
11-21-2013, 01:28 PM
|
#3
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
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.
|
11-21-2013, 02:09 PM
|
#4
|
Member
Registered: Aug 2012
Posts: 118
Original Poster
Rep: 
|
Quote:
Originally Posted by schneidz
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 ~]$
|
|
|
11-21-2013, 02:12 PM
|
#5
|
Member
Registered: Aug 2012
Posts: 118
Original Poster
Rep: 
|
Quote:
Originally Posted by TobiSGD
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 ~]$
|
|
|
11-21-2013, 02:15 PM
|
#6
|
Member
Registered: Aug 2012
Posts: 118
Original Poster
Rep: 
|
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).
|
|
|
11-21-2013, 02:32 PM
|
#7
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
not sure... would making a dd image of the drive before-hand make sense ?
|
|
|
11-22-2013, 12:34 AM
|
#8
|
Member
Registered: Aug 2012
Posts: 118
Original Poster
Rep: 
|
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?)
|
|
|
11-24-2013, 01:12 AM
|
#9
|
Member
Registered: Aug 2012
Posts: 118
Original Poster
Rep: 
|
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.
|
|
|
11-24-2013, 04:44 PM
|
#10
|
Member
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 572
Rep: 
|
Maybe an obvious question (and I don't know the answer to!) but does the linux version of clamav detect windows viruses?
|
|
|
11-24-2013, 06:16 PM
|
#11
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
Quote:
Originally Posted by devnull10
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
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.
|
|
|
All times are GMT -5. The time now is 02:56 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|