Date: Tue, 19 Jan 2010 10:35:00 -0800 From: Chuck Swiger <cswiger@mac.com> To: Doug Poland <doug@polands.org> Cc: questions Questions <questions@freebsd.org> Subject: Re: Trouble getting a core dump from clamd Message-ID: <6C738BD4-71EE-4F34-8DB5-ABDB45A06C89@mac.com> In-Reply-To: <a3de0a40551edaedbb49b1d5ac2366a2.squirrel@email.polands.org> References: <db60663b086aed5329984a666b8b7e08.squirrel@email.polands.org> <d36406631001190910g5c56b43en9ca9b87bf244a40d@mail.gmail.com> <a3de0a40551edaedbb49b1d5ac2366a2.squirrel@email.polands.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi--
On Jan 19, 2010, at 10:04 AM, Doug Poland wrote:
> No joy.
>
> # sysctl kern.corefile=/var/crash/clamd.core
> # /usr/local/etc/rc.d/clamav-clamd start
> Starting clamav_clamd.
> Segmentation fault
> # ll /var/crash
> total 2
> -rw-r--r-- 1 root wheel 5 Apr 10 2005 minfree
Please see "man 5 core"; in particular, clamd changes userid:
By default, a process that changes user or group credentials whether real
or effective will not create a corefile. This behaviour can be changed
to generate a core dump by setting the sysctl(8) variable
kern.sugid_coredump to 1.
...so you will need to toggle that sysctl also. I'd suggest doing something more like:
mkdir /cores
chmod 1777 /cores
sysctl kern.sugid_coredump=1
sysctl kern.corefile=/cores/%N.%P.core
...but adjust the path to be under /var or /usr if free diskspace makes doing so necessary.
Regards,
--
-Chuck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6C738BD4-71EE-4F34-8DB5-ABDB45A06C89>
