Hi there,

On Sun, 23 Jan 2022, Dorian ROSSE via clamav-users wrote:

i have do the command line following for repair freshclam ...

...                          chown root:root /var/log/clamav/freshclam.log
...
root@ubuntu-ThinkPad-X250:~# chmod 755 /var/log/clamav/freshclam.log
root@ubuntu-ThinkPad-X250:~# freshclam

Why did you think you needed to change the ownership and permissions?

Please do not do things like this unless you know what you are doing,
an installation by the package manager should set everything up for
you without any need for you to tinker with permissions.

You didn't repair anything.  You probably broke things.  In any case
you should not use the '755' mode for a log file because a log file is
not intended to be executable; mode '644' would be more appropriate,
perhaps '640' or even '600' if you want to restrict who can read it.
But in general I recommend you let the people who maintain the ClamAV
packages for your distribution set things up.  They probably have at
least a reasonable explanation for doing what they do.

See the 'man' pages for chmod and chown for more information.

...
ERROR: Can't open /var/log/clamav/freshclam.log in append mode (check 
permissions!).
ERROR: Problem with internal logger (UpdateLogFile = 
/var/log/clamav/freshclam.log).
ERROR: initialize: libfreshclam init failed.
ERROR: Initialization error!'''

This *probably* means that only root is be able to write to the file,
and I guess that you are not running freshclam as root.  In any case,
like any other utility which does not *need* to be run as root, you
should not run freshclam as root (but you should make sure that it can
write the files which it needs to write, e.g. its log files).

If you can find the user name which is used to run freshclam on your
system, and chown the freshclam.log file so that user is the owner,
then (assuming that you haven't done any other damage) when freshclam
runs it should be able to write to the log.

The ClamAV database files are probably owned by the same user, what
user is that?

Exactly how did you install ClamAV?

Can you cut-n-paste the output of the command

clamconf -n

so that we can see your configuration?

Do you have something like SELinux on your system?

How much memory does your laptop have?

--

73,
Ged.

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml

Reply via email to