FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 06-07-2011, 12:48 PM
"Arthur Dent"
 
Default Why is clamd so hard?

This may be better posted to a clamav forum - but I want to try here (vent
a bit!) first.

In the past (Fedoras 6ish - 13) I have installed clamd from source because
I was frustrated with the slow speed of updates when a new version of clam
became available. However, this brough with it a raft of SELinux problems
and one of the comments on the SELinux list was "why don't you use the yum
repo version?"

Well, in upgrading to F15 I though I would give it a try...

Everything is in different places and called different things to what I
was used to but I am really stumped with this one:

When I try to start clamd with the "service clamd start" command systemd
fails and gives the very unhelpful detail "Process: 17780
ExecStart=/etc/rc.d/init.d/clamd start (code=exited, status=1/FAILURE)"
What the hell does status=1 mean?

So I try to start it from the command line:
ERROR: Can't open/parse the config file /etc/clamd.conf

Now here's the thing... /etc/clamd.conf is where the config file used to
be in F13 when I compiled from source, but this is a bare-metal install of
F15 with clam* installed through yum. The config file is now in
/etc/clam.d/clamd.conf

The /etc/init.d/clamd script simply has the following in it:
# cat /etc/init.d/clamd
======8<========================================== ===
#!/bin/bash
#
# chkconfig: - 75 35
# description: The clamd server running for <SERVICE>

CLAMD_SERVICE=clamd
. /usr/share/clamav/clamd-wrapper
======8<========================================== ===

and /usr/share/clamav/clamd-wrapper (which is symlinked to
/etc/init.d/clamd-wrapper) has this line in it:
CLAMD_CONFIGFILE=/etc/clamd.d/${CLAMD_SERVICE}.conf

Finally /etc/sysconfig/clamd has this in it:
# cat /etc/sysconfig/clamd
======8<========================================== ===
CLAMD_CONFIGFILE=/etc/clamd.d/clamd.conf
CLAMD_SOCKET=/var/run/clamd/clamd.sock
#CLAMD_OPTIONS=
======8<========================================== ===

Nowhere can I find any reference to /etc/clamd.conf - everywhere it seems
to be referenced as /etc/clamd.d/clamd.conf

So why does it fail with the message
ERROR: Can't open/parse the config file /etc/clamd.conf
???



--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-08-2011, 10:29 AM
"Arthur Dent"
 
Default Why is clamd so hard?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> This may be better posted to a clamav forum - but I want to try here (vent
> a bit!) first.
>
> In the past (Fedoras 6ish - 13) I have installed clamd from source because
> I was frustrated with the slow speed of updates when a new version of clam
> became available. However, this brough with it a raft of SELinux problems
> and one of the comments on the SELinux list was "why don't you use the yum
> repo version?"
>
> Well, in upgrading to F15 I though I would give it a try...
>
> Everything is in different places and called different things to what I
> was used to but I am really stumped with this one:
>
> When I try to start clamd with the "service clamd start" command systemd
> fails and gives the very unhelpful detail "Process: 17780
> ExecStart=/etc/rc.d/init.d/clamd start (code=exited, status=1/FAILURE)"
> What the hell does status=1 mean?
>
> So I try to start it from the command line:
> ERROR: Can't open/parse the config file /etc/clamd.conf
>
> Now here's the thing... /etc/clamd.conf is where the config file used to
> be in F13 when I compiled from source, but this is a bare-metal install of
> F15 with clam* installed through yum. The config file is now in
> /etc/clam.d/clamd.conf
>
> The /etc/init.d/clamd script simply has the following in it:
> # cat /etc/init.d/clamd
> ======8<========================================== ===
> #!/bin/bash
> #
> # chkconfig: - 75 35
> # description: The clamd server running for <SERVICE>
>
> CLAMD_SERVICE=clamd
> . /usr/share/clamav/clamd-wrapper
> ======8<========================================== ===
>
> and /usr/share/clamav/clamd-wrapper (which is symlinked to
> /etc/init.d/clamd-wrapper) has this line in it:
> CLAMD_CONFIGFILE=/etc/clamd.d/${CLAMD_SERVICE}.conf
>
> Finally /etc/sysconfig/clamd has this in it:
> # cat /etc/sysconfig/clamd
> ======8<========================================== ===
> CLAMD_CONFIGFILE=/etc/clamd.d/clamd.conf
> CLAMD_SOCKET=/var/run/clamd/clamd.sock
> #CLAMD_OPTIONS=
> ======8<========================================== ===
>
> Nowhere can I find any reference to /etc/clamd.conf - everywhere it seems
> to be referenced as /etc/clamd.d/clamd.conf
>
> So why does it fail with the message
> ERROR: Can't open/parse the config file /etc/clamd.conf
> ???

So I guess I need to take this to the clamav-users list?

No-one here got clamd working with F15?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk3vTwYACgkQ75heFf3niHJmLgCgnxrr6WXkFF at0EWJPAREG6Fb
7/8Anjy/Iqyt1bj5WohgjjB2Q8lJ3vSZ
=3NVd
-----END PGP SIGNATURE-----

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-08-2011, 11:22 AM
Frank Murphy
 
Default Why is clamd so hard?

On 08/06/11 11:29, Arthur Dent wrote:
<snip>
> No-one here got clamd working with F15?
>
http://blog.christophersmart.com/

search for configure-clamd


--
Regards,

Frank Murphy
UTF_8 Encoded
Friend of Fedora
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-08-2011, 02:08 PM
"Arthur Dent"
 
Default Why is clamd so hard?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> On 08/06/11 11:29, Arthur Dent wrote:
> <snip>
>> No-one here got clamd working with F15?
>>
> http://blog.christophersmart.com/
>
> search for configure-clamd
>

Thanks for that Frank - although I had already found that script and tried
it with a previous install, I had forgotten about it so I tried it again
just now.

No dice....

I think it may pre-date the current Fedora schema. It also creates a
"clamav" user which the docs say you shouldn't use with clamd (as that
user has access to the DB).

Nevertheless I gave it a go. Here is the output:

=============8<=================================== ===============
# ./configure-clamd.sh

You appear to be running Fedora release 15 (Lovelock), excellent.

Configuring clamd to run as user 'clamav' on port '3310'.

If you do NOT want to proceed, hit CTRL+C within 5 seconds...
5.. 4.. 3.. 2.. 1..
OK then, proceeding..

Checking for required packages..
Required packages already installed.

Checking for clamav user, 'clamav'..
Created new user.

Configuring clamd to do all the right things..
Configuring log rotation for clamd..
Configuring clamd under syconfig..
Configuring clamd init script..
Configuring freshclam, the clamav updater..
Configuring required directories..
Downloading virus definitions..

ClamAV update process started at Wed Jun 8 14:51:15 2011
Downloading main.cvd [100%]
main.cvd updated (version: 53, sigs: 846214, f-level: 53, builder: sven)
Downloading daily.cvd [100%]
daily.cvd updated (version: 13166, sigs: 126780, f-level: 60, builder:
ccordes)
Downloading bytecode.cvd [100%]
bytecode.cvd updated (version: 143, sigs: 40, f-level: 60, builder: edwin)
Database updated (973034 signatures) from db.uk.clamav.net (IP: 163.1.3.8)

Creating required directories and starting service..
Could not start service, sorry. Continuing.


================================================== =====================
The clamd service has been successfully installed and configured with:
User 'clamav' on port '3310'.

To update ClamAV definitions, run the 'freshclam' command as user clamav.
================================================== =====================

Have fun!

=============8<=================================== ===============

Notice the script says everything is OK, but it still fails to start the
clammd service.

If I try manually I get the same problem...

# clamd
ERROR: Can't open/parse the config file /etc/clamd.conf

Any ideas?

Fundamentally the config file is actually in /etc/clamd.d/clamd.conf
(which is where Fedora says it should be now), but it is resolutely
refusing to recognise that location...

Thanks again

Mark



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEUEARECAAYFAk3vgmkACgkQ75heFf3niHJvmgCgl5ajkdHFyt ELOb2K3ppIN/o0
xpoAlRoVP5OZUnJI8yU9sUVV6P3f5bc=
=QGP5
-----END PGP SIGNATURE-----

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-08-2011, 02:08 PM
"Arthur Dent"
 
Default Why is clamd so hard?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> On 08/06/11 11:29, Arthur Dent wrote:
> <snip>
>> No-one here got clamd working with F15?
>>
> http://blog.christophersmart.com/
>
> search for configure-clamd
>

Thanks for that Frank - although I had already found that script and tried
it with a previous install, I had forgotten about it so I tried it again
just now.

No dice....

I think it may pre-date the current Fedora schema. It also creates a
"clamav" user which the docs say you shouldn't use with clamd (as that
user has access to the DB).

Nevertheless I gave it a go. Here is the output:

=============8<=================================== ===============
# ./configure-clamd.sh

You appear to be running Fedora release 15 (Lovelock), excellent.

Configuring clamd to run as user 'clamav' on port '3310'.

If you do NOT want to proceed, hit CTRL+C within 5 seconds...
5.. 4.. 3.. 2.. 1..
OK then, proceeding..

Checking for required packages..
Required packages already installed.

Checking for clamav user, 'clamav'..
Created new user.

Configuring clamd to do all the right things..
Configuring log rotation for clamd..
Configuring clamd under syconfig..
Configuring clamd init script..
Configuring freshclam, the clamav updater..
Configuring required directories..
Downloading virus definitions..

ClamAV update process started at Wed Jun 8 14:51:15 2011
Downloading main.cvd [100%]
main.cvd updated (version: 53, sigs: 846214, f-level: 53, builder: sven)
Downloading daily.cvd [100%]
daily.cvd updated (version: 13166, sigs: 126780, f-level: 60, builder:
ccordes)
Downloading bytecode.cvd [100%]
bytecode.cvd updated (version: 143, sigs: 40, f-level: 60, builder: edwin)
Database updated (973034 signatures) from db.uk.clamav.net (IP: 163.1.3.8)

Creating required directories and starting service..
Could not start service, sorry. Continuing.


================================================== =====================
The clamd service has been successfully installed and configured with:
User 'clamav' on port '3310'.

To update ClamAV definitions, run the 'freshclam' command as user clamav.
================================================== =====================

Have fun!

=============8<=================================== ===============

Notice the script says everything is OK, but it still fails to start the
clammd service.

If I try manually I get the same problem...

# clamd
ERROR: Can't open/parse the config file /etc/clamd.conf

Any ideas?

Fundamentally the config file is actually in /etc/clamd.d/clamd.conf
(which is where Fedora says it should be now), but it is resolutely
refusing to recognise that location...

Thanks again

Mark



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEUEARECAAYFAk3vgmkACgkQ75heFf3niHJvmgCgl5ajkdHFyt ELOb2K3ppIN/o0
xpoAlRoVP5OZUnJI8yU9sUVV6P3f5bc=
=QGP5
-----END PGP SIGNATURE-----

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-08-2011, 02:21 PM
Ed Greshko
 
Default Why is clamd so hard?

Arthur Dent <misc.lists@blueyonder.co.uk>
>ERROR: Can't open/parse the config file /etc/clamd.conf
>
>Any ideas?
>
>Fundamentally the config file is actually in /etc/clamd.d/clamd.conf
>(which is where Fedora says it should be now), but it is resolutely
>refusing to recognise that location...
>
>Thanks again


Broke my system so can't check earlier emails. But, I think you said you checked bugzilla.

I suppose I would create a symbolic link in /etc pointing to the config file in clamd.d and see if that is a work around.



--
Sent from my Android tablet with K-9 Mail.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-08-2011, 02:21 PM
Ed Greshko
 
Default Why is clamd so hard?

Arthur Dent <misc.lists@blueyonder.co.uk>
>ERROR: Can't open/parse the config file /etc/clamd.conf
>
>Any ideas?
>
>Fundamentally the config file is actually in /etc/clamd.d/clamd.conf
>(which is where Fedora says it should be now), but it is resolutely
>refusing to recognise that location...
>
>Thanks again


Broke my system so can't check earlier emails. But, I think you said you checked bugzilla.

I suppose I would create a symbolic link in /etc pointing to the config file in clamd.d and see if that is a work around.



--
Sent from my Android tablet with K-9 Mail.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-08-2011, 02:32 PM
Frank Murphy
 
Default Why is clamd so hard?

On 08/06/11 15:08, Arthur Dent wrote:

> # clamd
> ERROR: Can't open/parse the config file /etc/clamd.conf
>
> Any ideas?
>
> Fundamentally the config file is actually in /etc/clamd.d/clamd.conf

/etc/clamd.d/clamav.conf

chkconfig --list clamd.clamav (for status)

> (which is where Fedora says it should be now), but it is resolutely
> refusing to recognise that location...

Don't go by the Fedora docman pages,
for this.
totally user unfriendly.

also
/etc/freshclam.conf
/etc/sysconfig/freshclam


--
Regards,

Frank Murphy
UTF_8 Encoded
Friend of Fedora
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-08-2011, 02:40 PM
"Arthur Dent"
 
Default Why is clamd so hard?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> Arthur Dent <misc.lists@blueyonder.co.uk>
>>ERROR: Can't open/parse the config file /etc/clamd.conf
>>
>>Any ideas?
>>
>>Fundamentally the config file is actually in /etc/clamd.d/clamd.conf
>>(which is where Fedora says it should be now), but it is resolutely
>>refusing to recognise that location...
>>
>>Thanks again
>
>
> Broke my system so can't check earlier emails. But, I think you said you
> checked bugzilla.
>
> I suppose I would create a symbolic link in /etc pointing to the config
> file in clamd.d and see if that is a work around.

Genius!

Thanks Ed!

That's got me at least part of the way there. Clamd now starts. At least
when invoked directly.

When I try to start it using "service clamd start" it fails (bl%#dy
systemd)....

Oh wait - I've got a couple of SELinux AVCs... I'm just going to take a
look at those and see if they fix the systemd problem.

But in the meantime - Thanks! You've got me further in 5mins than I
managed in two days...

Cheers
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk3vid0ACgkQ75heFf3niHLpBwCcD39DKqW5SC T8ZfHpJdbLBrGW
7BUAmwX0IkLmCJOXNNOKJT37Tz4mpuDZ
=gXjG
-----END PGP SIGNATURE-----

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-09-2011, 12:28 AM
jdow
 
Default Why is clamd so hard?

On 2011/06/08 07:08, Arthur Dent wrote:

> If I try manually I get the same problem...
>
> # clamd
> ERROR: Can't open/parse the config file /etc/clamd.conf
>
> Any ideas?

yes, as a matter of fact I do.

man clamd
...
-c FILE, --config-file=FILE
Read configuration from FILE.
...

Try this: clamd -c /etc/clamd.d/clamd.conf

Reading The Fine Manual can help.

{o.o} Joanne
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 02:42 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org