zigzam

Well-Known Member
May 9, 2005
206
0
166
How can you disable core files from being created on linux (centos+redhat)?

I saw methods using the apache config file, but that only works with apache 1 and I haven't found one that works with apache 2.
 

WebHostDog

Well-Known Member
Sep 3, 2006
143
1
166
cPanel Access Level
Website Owner
Hello Zigzam.
Add this in /etc/sysctl.conf


kernel.core_uses_pid = 0
kernel.core_pattern = /dev/null


and:

sysctl -p
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
31
473
Go on, have a guess
It's probably better to use a trailing slash and then you only need the one directive:

kernel.core_pattern = /dev/null/

A couple of caveats:

1. This won't work on a Virtuozzo VPS
2. You should really inspect the core dump and fix the underlying problem