2012-07-19 126 views
0

我來問題,此Can't open file in php if one of directories is a symlink爲什麼suhosin.executor.allow_symlink存在安全問題?

了Suhosin ducumentation說suhosin.executor.allow_symlink

該標誌重新激活符號鏈接()當使用open_basedir的,這是通過在缺省了Suhosin> = 0.9禁用 0.6。允許使用符號鏈接(),而使用 open_basedir實際上是一個安全風險。

爲什麼它的安全問題,可如果它被設置爲關閉或發生什麼事,當我在使用的open_basedir根目錄?

回答

4

符號鏈接使得Web服務器的DocumentRoot強加給僞chroot監獄的'爆發'變得微不足道。使用符號鏈接時,您可以指向服務器上的任意文件/目錄,並且Web服務器將愉快地遵循符號鏈接,從不知道它留在DocumentRoot的範圍內。考慮如果您有以下情況會發生什麼:

ln -s /etc/shadow /www/docroot/index.html 
ln -s /etc/passwd /www/docroot/index2.html