wordpress在Linux nginx下權限設置

一、wordpress 權限對安裝和使用效果的影響很大:權限錯誤將影響theme的安裝:不能安裝theme或者修改theme或刪除theme。
相關設置: 
chmod 755 wordpress
find wordpress -type d -exec chmod 755 {} \;
find wordpress -type f  -exec chmod 644 {} \;
chown -R nginx:nginx wordpress
 
方法見: http://my.oschina.net/kjpioo/blog/162697
 
二、 uploads目錄的安全:
問 題描述:linux 下 最新版  wordpress ,上傳theme,theme安裝成功後,在 wordpress/wp-content/uploads/ 目錄下有 2013/09/theme_name.zip 文件存在。  雖然 2013/09/ 目錄都是禁止list的,可是如何禁止 theme_name.zip 文件被客戶端窺探到(防止被下載)
 
解決方案:
方案1:每次上傳和安裝好theme 後,手動刪除 uploads的  .zip文件
 
方案2:在uploads目錄下用 .htaccess的 Rewrite 規則,能夠對http://SITE_URL/uploads/2013/09/theme_name.zip 的訪問 進行屏蔽。
 
方法見: http://my.oschina.net/kjpioo/blog/162696
相關文章
相關標籤/搜索