Safe mode özü özlüyündə boş bir şeydir.Əslində serverdə full proof hardening metodları bu kimi primitiv metodlarla həyata keçirilməməlidir.(mod php)
Ən yaxşı sayılan və geniş istifadə edilən metod suphp + suexec privilegie separationdur.
suphp+suexec yəni =CGİ/FAST CGİ implementationdursa serverdə 99% halda tərpənmək olmur.İstər simlink+istər command execution.
Əsas bircə digər servislərdən özünü qorumaq lazımdır.Məsələn mysql vasiyəsilə icazə verməmək load data infile etməyə + secure file priv istifadə etmək mysql-də.
Amma suphp+Suexec-in deyərdim özünün bircə yeganə mənfi cəhəti scriptin interpretator tərəfindən işləmə sürətinin zəif olmasındadır.Security nöqtəyi nəzərindən isə əlverişlidir.
http://php.net/manual/en/features.safe-mode.php
Kod:
The PHP safe mode is an attempt to solve the shared-server security problem. It is architecturally incorrect to try to solve this problem at the PHP level, but since the alternatives at the web server and OS levels aren't very realistic, many people, especially ISP's, use safe mode for now.
Warning
This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.