where is the security in PHP 5.4 by removing safe_mode

谁都会走 提交于 2019-11-28 03:34:19

问题


I've got a sticky question in my mind: safe_mode has removed in PHP 5.4, so what is the security in this removal?

Does it mean that any application can execute any program?

What technique is used for this purpose to prevent such violent actions?


回答1:


This article Will explain you why safe_mode has never made a single bit of sense and only provides you a false sense of security.




回答2:


safe_mode was trying to solve a security problem with the wrong tool. Since shared webhosts often host thousands of websites on one server, safe_mode was a convienent (and entirely inappropriate) method to restrict the damage one could do with PHP.

It was an illusion more than anything else. Though PHP may have been protected with safe_mode, what about other languages like Python and Ruby? The proper method is to use default linux file permissions and modules like suPHP which run PHP as restricted users.



来源:https://stackoverflow.com/questions/9763531/where-is-the-security-in-php-5-4-by-removing-safe-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!