2
我有一個專門的服務器與cPanel,託管我們的自定義後端系統和多個網站。後端託管在一個單獨的域中,幷包含一個文件夾(「共享」),其中包含許多由後端控制的所有網站使用的php類和圖像。使用符號鏈接和PHP包括外部用戶的目錄與cPanel
For example:
Backend: 'backend.com'
Website 1: 'website1.com'
Website 2: 'website2.com'
etc.
我創建了一個符號鏈接從website1.com這樣的:
ln -s /home/backend/public_html/shared/ /home/website1/public_html/shared
然後我禁用了website1.com的open_basedir的保護cPanel和創建.user.ini文件來設置值的open_basedir :
open_basedir = /home/website1/public_html/:/home/backend/public_html/shared/
當我試圖通過website1.com在(符號鏈接)的共享文件夾訪問一個文件,我得到一個500內部服務器錯誤。 apache日誌顯示:
[Fri Nov 20 03:51:45 2015] [error] [client xxx.xxx.xx.xx] SoftException in Application.cpp:422: Mismatch between target UID (513) and UID (512) of file "/home/website1/public_html/shared/__debug.php"
[Fri Nov 20 03:51:45 2015] [error] [client xxx.xxx.xx.xx] Premature end of script headers: __debug.php
我知道用戶/組之間存在不匹配,但是有沒有辦法解決這個問題?