Securing PHP - death to safe mode!
Posted: Wed Jun 13, 2007 4:30 pm
I wanted to ask all the nice people in here which are the steps you follow to secure your PHP installation. In addition to basic active and passive system security (tmp set as noexec, limit permissions on system executables where possible, keep your system updated, aide, chkrootkit, rkhunter, watchdog, and so on), which are the steps you follow the secure php?
Safe mode has always been a dirty thing, but it was useful in some environments - now, as we know, Safe mode will be finally and definitely removed from PHP (PHP 6 builds already do not have it), so I wanted to know which will be your extra steps to secure your PHP-powered http server.
I have never chrooted apache on a live server, as it proved to be a pain to maintain (and Plesk didn't make things any easier) - grsec could be useful, but currently I have only SELinux's basic policy, with some easy customization done to use sendmail properly through php, as grsec had some issues running on my system.
So what do you do? If you ever chrooted apache on a Plesk server, can you give me some tips to make the process easier?
Safe mode has always been a dirty thing, but it was useful in some environments - now, as we know, Safe mode will be finally and definitely removed from PHP (PHP 6 builds already do not have it), so I wanted to know which will be your extra steps to secure your PHP-powered http server.
I have never chrooted apache on a live server, as it proved to be a pain to maintain (and Plesk didn't make things any easier) - grsec could be useful, but currently I have only SELinux's basic policy, with some easy customization done to use sendmail properly through php, as grsec had some issues running on my system.
So what do you do? If you ever chrooted apache on a Plesk server, can you give me some tips to make the process easier?