Tiny Core Linux

Tiny Core Extensions => TCE Bugs => Topic started by: beroje on January 27, 2013, 10:48:25 AM

Title: Clamav
Post by: beroje on January 27, 2013, 10:48:25 AM
tc@box:~$ tce-load -i /mnt/sda6/TCZ40repo/tce/optional/clamav.tcz
bzip2-lib.tcz: OK
clamav.tcz: OK
tc@box:~$ freshclam
ERROR: Can't create temporary directory /usr/local/share/clamav/clamav-aaf5848a53b90884762dfc97b82994e0
Hint: The database directory must be writable for UID 1001 or GID 50
tc@box:~$
tc@box:~$ sudo freshclam
ERROR: Can't create temporary directory /usr/local/share/clamav/clamav-c9df506cd03f1330949264aba2d5b716
Hint: The database directory must be writable for UID 1000 or GID 1000
tc@box:~$
tc@box:~$
tc@box:~$
tc@box:~$ sudo mkdir /usr/local/share/clamav/dir_test
tc@box:~$ la /usr/local/share/clamav/
total 0
drwxr-xr-x    4 1002     staff           80 Jan 27 11:14 ./
drwxr-xr-x   27 root     root           540 Jan 18 21:44 ../
drwxr-xr-x    2 root     root            40 Jan 27 11:14 dir_test/
drwxr-xr-x    2 1002     staff           80 Jan 18 21:44 files/
tc@box:~$


Title: Re: Clamav
Post by: Jason W on January 27, 2013, 10:55:31 AM
Freshclam has to be started as root, I have read that in several places just now to make sure.
Title: Re: Clamav
Post by: beroje on January 27, 2013, 01:08:41 PM
tc@box:~$ tce-load -i /mnt/sda6/TCZ40repo/tce/optional/clamav.tcz
bzip2-lib.tcz: OK
clamav.tcz: OK
tc@box:~$ freshclam
ERROR: Can't create temporary directory /usr/local/share/clamav/clamav-6a74f46a753dd77009e4e40b65c6c1a2
Hint: The database directory must be writable for UID 1001 or GID 50
tc@box:~$
Title: Re: Clamav
Post by: Rich on January 27, 2013, 01:29:01 PM
Hi beroje
Maybe
Code: [Select]
sudo su
freshclam
Title: Re: Clamav
Post by: beroje on January 27, 2013, 01:38:21 PM
tc@box:~$ sudo su
root@box:~# freshclam
ERROR: Can't create temporary directory /usr/local/share/clamav/clamav-9e21b618e853a7e63252f46ed5865526
Hint: The database directory must be writable for UID 1000 or GID 1000
root@box:~#
========================================================================

Title:          clamav.tcz
Description:    An anti-virus utility for Unix-like systems.
Version:        0.97.6
Author:         Tomasz Kojm
Original-site:  http://www.clamav.net/
Copying-policy: GPL
Size:           5.5M
Extension_by:   Remus
Tags:       An anti-virus utility Unix-like systems.
Comments:       You must run "freshclam" before this app can be used.
                That will fetch the incremental backup to get up to date.
Title: Re: Clamav
Post by: Rich on January 27, 2013, 01:48:29 PM
Hi beroje
What does:
Code: [Select]
stat /usr/local/share/clamavreturn?
Title: Re: Clamav
Post by: beroje on January 27, 2013, 02:01:00 PM
tc@box:~$ stats /usr/local/share/clamav
options are:
 -bg2 color
 -bg color
 -di[splay] host:n.n
 -dn[d]
 -fg color
 -g[eometry] WxH+X+Y
 -i[conic]
 -k[bd]
 -na[me] classname
 -nod[nd]
 -nok[bd]
 -not[ooltips]
 -s[cheme] scheme
 -ti[tle] windowtitle
 -to[oltips]
tc@box:~$
Title: Re: Clamav
Post by: Rich on January 27, 2013, 02:03:46 PM
Hi beroje
That's  stat  not  stats
Title: Re: Clamav
Post by: Rich on January 27, 2013, 02:20:10 PM
Hi beroje
If you don't have stat on your machine then:
Code: [Select]
ls -l /usr/local/share | grep clam*
Title: Re: Clamav
Post by: beroje on January 27, 2013, 02:44:17 PM
tc@box:~$ ls -l /usr/local/share | grep clam*
drwxr-xr-x    3 1002     staff           60 Jan 18 21:44 clamav/
tc@box:~$
Title: Re: Clamav
Post by: Rich on January 27, 2013, 02:52:59 PM
Hi beroje
I think this is what you need:
Code: [Select]
sudo chmod /usr/local/share/clamav 1000:staff
sudo freshclam
Title: Re: Clamav
Post by: beroje on January 27, 2013, 02:55:48 PM
tc@box:~$ sudo chmod /usr/local/share/clamav 1000:staff
chmod: 1000:staff: No such file or directory
tc@box:~$

Title: Re: Clamav
Post by: Rich on January 27, 2013, 03:00:31 PM
Hi beroje
Sorry, should be:
Code: [Select]
sudo chmod 1000:staff /usr/local/share/clamav
sudo freshclam
Title: Re: Clamav
Post by: beroje on January 27, 2013, 03:03:45 PM
tc@box:~$ sudo chmod 1000:staff /usr/local/share/clamav
chmod: invalid mode '1000:staff'
tc@box:~$

Title: Re: Clamav
Post by: Rich on January 27, 2013, 03:07:09 PM
Hi beroje
Sorry, again.
Code: [Select]
sudo chown 1000:staff /usr/local/share/clamav
sudo freshclam
Title: Re: Clamav
Post by: beroje on January 27, 2013, 03:22:39 PM
tc@box:~$ sudo chown 1000:staff /usr/local/share/clamav
tc@box:~$ sudo freshclam
ClamAV update process started at Sun Jan 27 15:38:45 2013
Downloading main.cvd [100%]
main.cvd updated (version: 54, sigs: 1044387, f-level: 60, builder: sven)
Downloading daily.cvd [100%]
daily.cvd updated (version: 16578, sigs: 631536, f-level: 63, builder: guitar)
Downloading bytecode.cvd [100%]
bytecode.cvd updated (version: 210, sigs: 39, f-level: 63, builder: neo)
Database updated (1675962 signatures) from database.clamav.net (IP: 150.214.142.197)
tc@box:~$

Rich, Muchas gracias...
Title: Re: Clamav
Post by: Rich on January 27, 2013, 03:26:43 PM
Hi beroje
You are welcome. Sorry about the bad commands, my brain must have been malfunctioning, probably needs
to be rebooted. ::)
Title: Re: Clamav
Post by: remus on June 27, 2013, 11:16:13 PM
Looks like I might need to update the extension ?