How to stop generating core or coredump files

VPS and dedicated server security tips. Preventing from attacks, ddos and more.

How to stop generating core or coredump files

Postby Mark » Sat Dec 26, 2009 12:35 am

You may come across core files which gets generated within your accounts . The possible reason for the core files getting generated is when a php process is killed, apache creates core files under your account .

On phpSuexec servers this may cause due to incorrect php.ini file placed in your account and if it is caused due to php/apache then you can get rid off those core files by editing the httpd startup file on the server end .

Code:

Code: Select all
root@server [~]# vi /etc/init.d/httpd


Search for ulimit lines .For eg : you can see these lines


Code: Select all
ulimit -n 1024
ulimit -n 4096
ulimit -n 8192
ulimit -n 16384


You need to add ulimit -c 0 at the end .Which will look like :


Code: Select all
ulimit -n 1024
ulimit -n 4096
ulimit -n 8192
ulimit -n 16384
ulimit -c 0


Save changes and quit.

Now kill / stop apache service and then start apache service on the server .



Code: Select all
root@server [~]# service httpd stop
root@server [~]# service httpd stop
httpd (no pid file) not running
root@server [~]# service httpd startssl
root@server [~]# service httpd startssl
httpd (pid 21154) already running
Mark
 
Posts: 124
Joined: Fri Dec 11, 2009 2:18 pm

Return to Securing your server

Who is online

Users browsing this forum: No registered users and 1 guest

cron