WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Clamav  (Read 7899 times)

Offline beroje

  • Full Member
  • ***
  • Posts: 130
Clamav
« 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:~$



Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Clamav
« Reply #1 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.

Offline beroje

  • Full Member
  • ***
  • Posts: 130
Re: Clamav
« Reply #2 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:~$

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11740
Re: Clamav
« Reply #3 on: January 27, 2013, 01:29:01 PM »
Hi beroje
Maybe
Code: [Select]
sudo su
freshclam

Offline beroje

  • Full Member
  • ***
  • Posts: 130
Re: Clamav
« Reply #4 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.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11740
Re: Clamav
« Reply #5 on: January 27, 2013, 01:48:29 PM »
Hi beroje
What does:
Code: [Select]
stat /usr/local/share/clamavreturn?

Offline beroje

  • Full Member
  • ***
  • Posts: 130
Re: Clamav
« Reply #6 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:~$

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11740
Re: Clamav
« Reply #7 on: January 27, 2013, 02:03:46 PM »
Hi beroje
That's  stat  not  stats

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11740
Re: Clamav
« Reply #8 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*

Offline beroje

  • Full Member
  • ***
  • Posts: 130
Re: Clamav
« Reply #9 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:~$

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11740
Re: Clamav
« Reply #10 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

Offline beroje

  • Full Member
  • ***
  • Posts: 130
Re: Clamav
« Reply #11 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:~$


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11740
Re: Clamav
« Reply #12 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

Offline beroje

  • Full Member
  • ***
  • Posts: 130
Re: Clamav
« Reply #13 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:~$


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11740
Re: Clamav
« Reply #14 on: January 27, 2013, 03:07:09 PM »
Hi beroje
Sorry, again.
Code: [Select]
sudo chown 1000:staff /usr/local/share/clamav
sudo freshclam