Information
core - limits the core file size
hard - for enforcing hard resource limits. These limits are set by the superuser and enforced by the Kernel. The user cannot raise their requirement of system resources above such values.
Setting a hard limit on core dumps prevents users from overriding the soft variable.
A core dump includes a memory image taken at the time the operating system terminates an application. The memory image could contain sensitive data and is generally useful only for developers trying to debug problems.
Solution
- Run the following command to comment out any entries that include a hard value for core greater than 0 in /etc/security/limits.conf and any file(s) in the /etc/security/limits.d/ directory.
Example:
# sed -ri '/^\s*[^#\n\r]+\s+hard\s+core\s+([1-9][0-9]*)/s/^/# /' /etc/security/limits.conf /etc/security/limits.d/* <xhtml:ol start="2"> - Create or edit a file in /etc/security/limits.d/ and add the following line:
* hard core 0
Example:
# printf '%s\n' "" "* hard core 0" >> /etc/security/limits.d/60-limits.conf