开发者

Restrict PHP access to root folders?

开发者 https://www.devze.com 2022-12-20 09:56 出处:网络
Im making sort of a service where people can upload PHP files and they get their own directory. Is there a way to prevent any way the PHP can access开发者_如何学C the root of the server? and just sta

Im making sort of a service where people can upload PHP files and they get their own directory.

Is there a way to prevent any way the PHP can access开发者_如何学C the root of the server? and just stay in the bounderies of its folder?


The open_basedir directive does just that :

Limit the files that can be opened by PHP to the specified directory-tree, including the file itself.


The most secure would be to chroot Apache and PHP.

0

精彩评论

暂无评论...
验证码 换一张
取 消