What is Core Dump File?
A core dump file is a copy/image of memory(RAM) of an Executable program which get terminated by system due to some error or any other fault. These files are mainly created to debug the error and used by developer to overcome the issue.
How to disable core dump files?
To disable core dump file you have to follow the below given steps:
1. Login to SSH as root.
2. Open the file /etc/security/limits.conf to limit '0'.
Save the file. It will hard limit to 0 for every user so that the user cannot increase that limit in his own session.
3. Add this code "fs.suid_dumpable = 0" to file /etc/sysctl.conf
4. Now last, add this code "ulimit -S -c 0 > /dev/null 2>&1" to file /etc/profile
A core dump file is a copy/image of memory(RAM) of an Executable program which get terminated by system due to some error or any other fault. These files are mainly created to debug the error and used by developer to overcome the issue.
How to disable core dump files?
To disable core dump file you have to follow the below given steps:
1. Login to SSH as root.
2. Open the file /etc/security/limits.conf to limit '0'.
Now, set:
Code:
* hard core 0
3. Add this code "fs.suid_dumpable = 0" to file /etc/sysctl.conf
This code will ensure not to make any core dumps by setuid programs in future.
4. Now last, add this code "ulimit -S -c 0 > /dev/null 2>&1" to file /etc/profile
This code will make soft limit and ensure to stop creation of core dumps for all users.