0

I installed clamAV on an EC2 instance running CentOS, i made the install and when I go to run 'sudo freshclam' i get

ERROR: Can't open/parse the config file /usr/local/etc/freshclam.conf 

However if I try to navigate to that file it does not exist so I opened up the executable freshclam file in nano and saw

link_command="(cd /home/ec2-user/clamav/freshclam; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; };
{ test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX ||
 { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; };
 { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; };
 PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/ec2-user/.local/bin:/home/ec2-user/bin; export PATH; gcc -g -O2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE 
 -D_FILE_OFFSET_BITS=64 -o \$progdir/\$file output.o optparser.o getopt.o misc.o cdiff.o tar.o clamdcom.o freshclam.o manager.o notify.o dns.o execute.o nonblock.o mirman.o 
 ../libclamav/.libs/libclamav.so -lxml2 -lbz2 -ldl /home/ec2-user/clamav/libclamav/.libs/libclammspack.so -lssl -lcrypto -ljson-c -lpcre2-8 -lm -lz -lresolv -lpthread -Wl,-rpath 
 -Wl,/home/ec2-user/clamav/libclamav/.libs -Wl,-rpath -Wl,/usr/local/lib64)"

is there anyway to modify this line or add in the directory that im missing in order to make clamAV work? (specifically the PATH= part?)

also, this is my first post here so if this is no the correct exchange please let me know and I will move this question to the correct board.

blau
  • 3
  • 3
  • 1
    What user is AV running as? Can that user open the file? – Tim May 07 '19 at 19:35
  • Ec2-user is running the file and is able to open and execute it – blau May 07 '19 at 19:36
  • Why are you opening the executable and wanting to modify it? That is completely unrelated to the error you posted. – Michael Hampton May 07 '19 at 19:44
  • I don't want to modify it if I don't have to, I just want to run 'freshclam' , I'm wondering if i have to create a path and copy files in order to make it work – blau May 07 '19 at 19:45
  • @MichaelHampton I posted that string of code to give context as to the path that it was using and possibly creating the error. Sorry, I am new, but please feel free to suggest a way to edit this question in a way that makes the most sense for this board. I am just trying to learn and am more than happy to post more info if you are able to guide me in a direction that will lead me to the correct solution. (I realize this is probably a noob/stupid question) :) – blau May 07 '19 at 19:51
  • 1
    The error says that it can't open the config file. You say the config file is not there. The first logical thing to do is to try to create a config file. – Michael Hampton May 07 '19 at 19:55
  • should i just move the freshclam.conf file or the clam av directory to that path? I moved the freshclam.conf file to that path and it did not work. – blau May 07 '19 at 19:57

0 Answers0