# 1. 先將所有資料夾一律設定為 755
find . -type d -exec chmod 755 {} \;
# 2. 再將所有檔案一律設定為 644
find . -type f -exec chmod 644 {} \;
# 3. 針對需要寫入的特殊資料夾,開啟寫入權限
chmod 777 cache/ files/ store/ images/avatars/upload/
# 4. 確保安裝完成後的設定檔是安全的
chmod 644 config.php
另外,也請確保整個討論區的檔案擁有者屬於執行 Apache/Nginx 的用戶
sudo chown -R www-data:www-data /path/to/your/phpBB3/