rseichter / fangfrisch

Update and verify unofficial Clam Anti-Virus signatures
GNU General Public License v3.0
86 stars 10 forks source link

Can't create database structure; fangfrisch command not found? #7

Closed Soffeas59 closed 4 years ago

Soffeas59 commented 4 years ago

Hello, thank you for working on an elegant update tool for ClamAV! This is awesome!

I am curious if I can get some help, stuck on this step (I'm on Fedora 32 desktop workstation) entered normally as myself (underprivileged user), not under root. i think i installed fangfrisch correctly in earlier steps.

[soffeas@localhost ~]$ pip3.8 install --user fangfrisch
Collecting fangfrisch
  Using cached https://files.pythonhosted.org/packages/e7/a8/e3044dbfff8abdf7a63bfa0a026a79cbeb94b99fa8d8bb74ffaa4d6c630b/fangfrisch-1.2.0-py3-none-any.whl
Requirement already satisfied: requests>=2.22.0 in /usr/lib/python3.8/site-packages (from fangfrisch) (2.22.0)
Requirement already satisfied: SQLAlchemy>=1.3.13 in ./.local/lib/python3.8/site-packages (from fangfrisch) (1.3.20)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python3.8/site-packages (from requests>=2.22.0->fangfrisch) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3.8/site-packages (from requests>=2.22.0->fangfrisch) (2.8)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/lib/python3.8/site-packages (from requests>=2.22.0->fangfrisch) (1.25.7)
Installing collected packages: fangfrisch
Successfully installed fangfrisch-1.2.0

[soffeas@localhost ~]$ fangfrisch 
usage: fangfrisch [-h] [-c CONF] [-f] [-p PROVIDER]
                  {dumpconf,dumpmappings,initdb,refresh}
fangfrisch: error: the following arguments are required: action

[soffeas@localhost ~]$ sudo -u clamav -- fangfrisch --conf /etc/fangfrisch.conf initdb
sudo: fangfrisch: command not found

i can't make sense of this.

help?

rseichter commented 4 years ago

Based on the output shown above, you have installed Fangfrisch as user soffeas but want to run the software as user clamav. The two users have different command paths (see PATH environment variable in BASH).

Try executing which fangfrisch as soffeas and use the displayed path for Fangfrisch in your sudo call. Note that this will require read/execute permissions for user clamav.

I don't use Fedora myself, but another option for you might be to install Fangfrisch as clamav right away.