Core dump is a memory or a storage dump which records the memory state of a computer program at specific instance when a program terminates abnormally. The abnormal termination of the program can be result of various reasons, however most OS are set to generate a core dump of memory state of the executable at time of failure.
They can be used for debugging by admins and mostly by software developers for the related applications, however in a shared hosting environments they are rarely used and only thing they are doing is taking additional disk space, which is problematic both for accounts users and servers admins.
It is recommended to disable them on such environments as they can always be enabled again if required for any specific debugging purpose.
They can be disabled using the limits.conf file , which is the configuration file for the pam_limit module. Below command can be used to disable the core dumps.
echo '* soft core 0' >> /etc/security/limits.conf
or alternatively you can open the configuration file in some editor , I like vi :
And then add below line in the configuration file :
* soft core 0
This will make sure that the core dumps are disabled on the server and are no more generated for any crashed applications.
You can use below command to find all the core files and delete them after examining :
find /home/*/public_html -name core.[0-9]*
There is a rare chance of some files with similar naming convention and being legitimate files, so it is recommended not to remove all core files automatically, rather you can view and check the results of above find command and then remove the core files manually.
The search location above is for a typical cPanel hosting servers, you can modify it according to your hosting or server environment.