[ClamaV] Erreur lors d'un freshclam

Résolu/Fermé
k_lou Messages postés 436 Date d'inscription samedi 6 août 2005 Statut Membre Dernière intervention 8 mars 2008 - 2 déc. 2006 à 13:06
 sivencl - 16 nov. 2008 à 05:45
Bonjour à tous,

Je viens d'installer la nouvelle mouture de ClamaV par les sources (.tar.bz2). Or, j'ai compris que pour mettre à jour la base antivirus, il faut simplement faire en mode "root" un freshclam.

J'ai donc lancé cette commande mais un message d'erreur apparait

[root@xxxxxxxx]# freshclam
ERROR: Please edit the example config file /usr/local/etc/freshclam.conf.
ERROR: Please edit the example config file /usr/local/etc/clamd.conf.
ERROR: Can't parse the config file /usr/local/etc/clamd.conf


Est ce qu'une bonne âme peut m'expliquer ce qui se passe ?

Merci

16 réponses

lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 567
2 déc. 2006 à 13:23
Salut,

et dans les fichier de configuration tu as quoi?

lami20j
0
k_lou Messages postés 436 Date d'inscription samedi 6 août 2005 Statut Membre Dernière intervention 8 mars 2008 80
2 déc. 2006 à 13:40
Bonjour lami20j et merci d'avoir répondu au post.

Lorsque j'édite le premier fichier :

[root@xxxxxxxx]# gedit usr/local/etc/freshclam.conf.

le fichier freshclam.conf apparait complètement vide.

Pour le clamd.conf :

<code>##
## Example config file for the Clam AV daemon
## Please read the clamd.conf(5) manual before editing this file.
##


# Comment or remove the line below.
Example

# Uncomment this option to enable logging.
# LogFile must be writable for the user running daemon.
# A full path is required.
# Default: disabled
#LogFile /tmp/clamd.log

# By default the log file is locked for writing - the lock protects against
# running clamd multiple times (if you want to run another clamd instance,
# please # copy the configuration file, change the LogFile variable, and run
# the daemon with the --config-file option).
# This option disables log file locking.
# Default: disabled
#LogFileUnlock

# Maximal size of the log file.
# Value of 0 disables the limit.
# You may use 'M' or 'm' for megabytes (1M = 1m = 1048576 bytes)
# and 'K' or 'k' for kilobytes (1K = 1k = 1024 bytes). To specify the size
# in bytes just don't use modifiers.
# Default: 1M
#LogFileMaxSize 2M

# Log time with each message.
# Default: disabled
#LogTime

# Also log clean files. Useful in debugging but drastically increases the
# log size.
# Default: disabled
#LogClean

# Use system logger (can work together with LogFile).
# Default: disabled
#LogSyslog

# Specify the type of syslog messages - please refer to 'man syslog'
# for facility names.
# Default: LOG_LOCAL6
#LogFacility LOG_MAIL

# Enable verbose logging.
# Default: disabled
#LogVerbose

# This option allows you to save a process identifier of the listening
# daemon (main thread).
# Default: disabled
#PidFile /var/run/clamd.pid

# Optional path to the global temporary directory.
# Default: system specific (usually /tmp or /var/tmp).
#TemporaryDirectory /var/tmp

# Path to the database directory.
# Default: hardcoded (depends on installation options)
#DatabaseDirectory /var/lib/clamav

# The daemon works in a local OR a network mode. Due to security reasons we
# recommend the local mode.

# Path to a local socket file the daemon will listen on.
# Default: disabled
LocalSocket /tmp/clamd

# Remove stale socket after unclean shutdown.
# Default: disabled
FixStaleSocket

# TCP port address.
# Default: disabled
#TCPSocket 3310

# TCP address.
# By default we bind to INADDR_ANY, probably not wise.
# Enable the following to provide some degree of protection
# from the outside world.
# Default: disabled
#TCPAddr 127.0.0.1

# Maximum length the queue of pending connections may grow to.
# Default: 15
#MaxConnectionQueueLength 30

# Clamd uses FTP-like protocol to receive data from remote clients.
# If you are using clamav-milter to balance load between remote clamd daemons
# on firewall servers you may need to tune the options below.

# Close the connection when the data size limit is exceeded.
# The value should match your MTA's limit for a maximal attachment size.
# Default: 10M
#StreamMaxLength 20M

# Limit port range.
# Default: 1024
#StreamMinPort 30000
# Default: 2048
#StreamMaxPort 32000

# Maximal number of threads running at the same time.
# Default: 10
#MaxThreads 20

# Waiting for data from a client socket will timeout after this time (seconds).
# Value of 0 disables the timeout.
# Default: 120
#ReadTimeout 300

# Waiting for a new job will timeout after this time (seconds).
# Default: 30
#IdleTimeout 60

# Maximal depth directories are scanned at.
# Default: 15
#MaxDirectoryRecursion 20

# Follow directory symlinks.
# Default: disabled
#FollowDirectorySymlinks

# Follow regular file symlinks.
# Default: disabled
#FollowFileSymlinks

# Perform internal sanity check (database integrity and freshness).
# Default: 1800 (30 min)
#SelfCheck 600

# Execute a command when virus is found. In the command string %v will
# be replaced by a virus name.
# Default: disabled
#VirusEvent /usr/local/bin/send_sms 123456789 "VIRUS ALERT: %v"

# Run as a selected user (clamd must be started by root).
# Default: disabled
#User clamav

# Initialize supplementary group access (clamd must be started by root).
# Default: disabled
#AllowSupplementaryGroups

# Stop daemon when libclamav reports out of memory condition.
#ExitOnOOM

# Don't fork into background.
# Default: disabled
#Foreground

# Enable debug messages in libclamav.
# Default: disabled
#Debug

# Do not remove temporary files (for debug purposes).
# Default: disabled
#LeaveTemporaryFiles


# By default clamd uses scan options recommended by libclamav. This option
# disables recommended options and allows you to enable selected ones below.
# DO NOT TOUCH IT unless you know what you are doing.
# Default: disabled
#DisableDefaultScanOptions

##
## Executable files
##

# PE stands for Portable Executable - it's an executable file format used
# in all 32-bit versions of Windows operating systems. This option allows
# ClamAV to perform a deeper analysis of executable files and it's also
# required for decompression of popular executable packers such as UPX, FSG,
# and Petite.
# Default: enabled
#ScanPE

# With this option clamav will try to detect broken executables and mark
# them as Broken.Executable
# Default: disabled
#DetectBrokenExecutables


##
## Documents
##

# This option enables scanning of Microsoft Office document macros.
# Default: enabled
#ScanOLE2

##
## Mail files
##

# Enable internal e-mail scanner.
# Default: enabled
#ScanMail

# If an email contains URLs ClamAV can download and scan them.
# WARNING: This option may open your system to a DoS attack.
#	   Never use it on loaded servers.
# Default: disabled
#MailFollowURLs


##
## HTML
##

# Perform HTML normalisation and decryption of MS Script Encoder code.
# Default: enabled
#ScanHTML


##
## Archives
##

# ClamAV can scan within archives and compressed files.
# Default: enabled
#ScanArchive

# Due to license issues libclamav does not support RAR 3.0 archives (only the
# old 2.0 format is supported). Because some users report stability problems
# with unrarlib it's disabled by default and you must uncomment the directive
# below to enable RAR 2.0 support.
# Default: disabled
#ScanRAR

# The options below protect your system against Denial of Service attacks
# using archive bombs.

# Files in archives larger than this limit won't be scanned.
# Value of 0 disables the limit.
# Default: 10M
#ArchiveMaxFileSize 15M

# Nested archives are scanned recursively, e.g. if a Zip archive contains a RAR
# file, all files within it will also be scanned. This options specifies how
# deep the process should be continued.
# Value of 0 disables the limit.
# Default: 8
#ArchiveMaxRecursion 9

# Number of files to be scanned within an archive.
# Value of 0 disables the limit.
# Default: 1000
#ArchiveMaxFiles 1500

# If a file in an archive is compressed more than ArchiveMaxCompressionRatio
# times it will be marked as a virus (Oversized.ArchiveType, e.g. Oversized.Zip)
# Value of 0 disables the limit.
# Default: 250
#ArchiveMaxCompressionRatio 300

# Use slower but memory efficient decompression algorithm.
# only affects the bzip2 decompressor.
# Default: disabled
#ArchiveLimitMemoryUsage

# Mark encrypted archives as viruses (Encrypted.Zip, Encrypted.RAR).
# Default: disabled
#ArchiveBlockEncrypted

# Mark archives as viruses (e.g. RAR.ExceededFileSize, Zip.ExceededFilesLimit)
# if ArchiveMaxFiles, ArchiveMaxFileSize, or ArchiveMaxRecursion limit is
# reached.
# Default: disabled
#ArchiveBlockMax


##
## Clamuko settings
## WARNING: This is experimental software. It is very likely it will hang
##	    up your system!!!
##

# Enable Clamuko. Dazuko (/dev/dazuko) must be configured and running.
# Default: disabled
#ClamukoScanOnAccess

# Set access mask for Clamuko.
# Default: disabled
#ClamukoScanOnOpen
#ClamukoScanOnClose
#ClamukoScanOnExec

# Set the include paths (all files in them will be scanned). You can have
# multiple ClamukoIncludePath directives but each directory must be added
# in a seperate line.
# Default: disabled
#ClamukoIncludePath /home
#ClamukoIncludePath /students

# Set the exclude paths. All subdirectories are also excluded.
# Default: disabled
#ClamukoExcludePath /home/guru

# Don't scan files larger than ClamukoMaxFileSize
# Value of 0 disables the limit.
# Default: 5M
#ClamukoMaxFileSize 10M



Voilou ! Qu'est ce qui ne va pas ?

Merci
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 567
2 déc. 2006 à 13:56
Voilà mon freshclam.conf
# Automatically created by the clamav-freshclam postinst
# Comments will get lost when you reconfigure the clamav-freshclam package

DatabaseOwner clamav
UpdateLogFile /var/log/clamav/freshclam.log
LogFileMaxSize 0
MaxAttempts 5
DatabaseMirror db.fr.clamav.net
DatabaseMirror database.clamav.net
DatabaseDirectory /var/lib/clamav/
DNSDatabaseInfo current.cvd.clamav.net
lami20j
0
k_lou Messages postés 436 Date d'inscription samedi 6 août 2005 Statut Membre Dernière intervention 8 mars 2008 80
2 déc. 2006 à 14:03
Merci de m'avoir donné ton freshclam.conf

Est ce qu'il me suffit de le copier et de remplacer mon fichier vide par celui ci pour que tout refonctionne ?
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 567
2 déc. 2006 à 14:04
Tu n'as rien à perdre si tu essaies :-)

Je ne l'ai jamais fait, mais tu ne crains rien.

lami20j
0
k_lou Messages postés 436 Date d'inscription samedi 6 août 2005 Statut Membre Dernière intervention 8 mars 2008 80
2 déc. 2006 à 17:45
Salut,

Hélas lami20j, la manip ne suffit pas pour faire marcher le bazard.
Le message est :

[root@xxxxxx]# freshclam
ERROR: Please edit the example config file /usr/local/etc/clamd.conf.
ERROR: Can't parse the config file /usr/local/etc/clamd.conf

Pourrais tu me donner une copie de ton fichier clamd.conf ?

Merci

k_lou
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 567
2 déc. 2006 à 17:51
tu as télécharger dépuis quel site?
0
k_lou Messages postés 436 Date d'inscription samedi 6 août 2005 Statut Membre Dernière intervention 8 mars 2008 80
2 déc. 2006 à 17:57
Je ne sais plus exactement où je l'ai téléchargé mais je commence également à me poser des questions sur l'intégrité du programme installé.

En règle générale, je télécharge mes programmes sources sur le site de l'éditeur. Je le vire de suite et ré-installe celui qui est là :

http://sourceforge.net/project/showfiles.php?group_id=86638&package_id=90197&release_id=461171

k_lou
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 567
2 déc. 2006 à 18:01
c'est parce que tu as dit par les sources (.tar.bz2)
attends je suis en train de l'installer depuis les sources pour voir
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 567
2 déc. 2006 à 18:20
Ayé, j'ai trouvé

dans les 2 fichiers
/usr/local/etc/freshclam.conf
/usr/local/etc/clamd.conf

tu as ça

# Comment or remove the line below.
Example


mets un # avant Example
# Comment or remove the line below.
#Example


ensuite tu tapes
/usr/local/sbin/clamd&
c'est pour démarrer le daemon (si tu veux)
/usr/local/bin/freshclam
--
lami20j

P.S. Utilise les fichiers d'origine, j'espère que tu as garder l'original de freshclam.conf :-)
Sinon tu le trouves dans le répertoire /etc des sources
0
k_lou Messages postés 436 Date d'inscription samedi 6 août 2005 Statut Membre Dernière intervention 8 mars 2008 80
2 déc. 2006 à 18:23
Lami20j,

J'ai effectivement écrit "la nouvelle mouture de ClamaV par les sources (.tar.bz2)" et c'est une erreur. Je voulais dire clamav 0.88.6 au format .tar.gz.

Je ne sais pas si c'est le bon vocabulaire mais je nomme tous les programmes au format .tar.gz ou .tar.bz2 comme étant des programmes depuis les sources.
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 567
2 déc. 2006 à 18:29
tar.bz2 ou .tbz2 on utilise cette convention pour les archives tar compressées avec bzip2
tar.gz ou .tgz on utilise cette convention pour les archives tar compressées avec gzip

avec la commande file fichier on peut savoir le type de fichier
sous le système GNU/Linux l'extension n'est pas nécessaire, en revanche son utilisation ne permet de savoir de quel type de fichier s'agit en nous evitant ainsi de vérifier avec file

j'attends des nouvelles pour ton clamav :-)
0
k_lou Messages postés 436 Date d'inscription samedi 6 août 2005 Statut Membre Dernière intervention 8 mars 2008 80
2 déc. 2006 à 18:34
Bon,

J'ai viré mon clamav avant d'avoir lu ton post clamav erreur lors d un freshclam#10

Je me suis amusé à installer Clamav en mode graphique par le Centre de Contrôle de ma Mandriva et tout s'est bien passé, tout fonctionne.

Je n'aurai donc pas le plaisir de faire ce que tu m'as dit

mets un # avant Example
# Comment or remove the line below.
#Example


mais te remercie de ton aide.

A bientôt et merci encore,

k_lou
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 567
2 déc. 2006 à 18:39
au moins on a trouvé pour quoi
comme ça si jamais quelqu'un d'autre rencontre ce problème :-)
0
k_lou Messages postés 436 Date d'inscription samedi 6 août 2005 Statut Membre Dernière intervention 8 mars 2008 80
2 déc. 2006 à 18:44
au moins on a trouvé pour quoi


Rectification : Tu as trouvé pourquoi. Il faut rendre à César ce qui est à César.

Merci pour ta gentillesse et de nous faire bénéficier de tes compétences.

k_lou
0
Bonsoir,
2 ans apres ce post m'a serieusement depanné : j'ai applique les modifs dans freshclam.conf et clamd.conf, et au lieu de "error truc truc", j'ai obtenu :
ClamAV update process started at Sun Nov 16 05:41:01 2008
main.cld is up to date (version: 49, sigs: 437972, f-level: 35, builder: sven)
daily.cld is up to date (version: 8636, sigs: 26077, f-level: 35, builder: guitar)

Merci Lamy20j.
0