適當的檔案目錄權限設定可以讓我們管理模組的安裝和更新時更為方便,無需透過 ftp 。

實作步驟

網站根目錄:/var/www/wordpress

操作人員帳號:david

sudo chown -R www-data:www-data /var/www/wordpress

sudo adduser david www-data

sudo find /var/www/wordpress -type d -exec chmod 770 {} \;
sudo find /var/www/wordpress -type f -exec chmod 660 {} \;

參考資料

Correct file permissions for WordPress on Apache

Changing File Permissions

Last modified: 2024-08-01

Author

Comments

Write a Reply or Comment

Your email address will not be published.