wordpress 在linux nginx下权限设置和安全总结

一、wordpress 权限对安装和使用效果的影响很大:权限错误将影响theme的安装:不能安装theme或者修改theme或删除theme。 php

相关设置:  linux

chmod 755 wordpress nginx

find wordpress -type d  -exec chmod 755 {} \; 安全

find wordpress -iname "*.php"  -exec chmod 644 {} \; wordpress

chown -R nginx:nginx wordpress spa

方法见: http://my.oschina.net/kjpioo/blog/162697 .net

二、 uploads目录 安全: blog

问题描述:linux 下 最新版  wordpress ,上传theme,theme安装成功后,在 wordpress/wp-content/uploads/ 目录下有 2013/09/theme_name.zip 文件存在。  虽然 2013/09/ 目录都是禁止list的,可是如何禁止 theme_name.zip 文件被客户端窥探到(防止被下载) ip

解决方案: it

方案1:每次上传和安装好theme 后,手动删除 uploads的  .zip文件

方案2:在uploads目录下用 .htaccess的 Rewrite 规则,能够对http://SITE_URL/uploads/2013/09/theme_name.zip 的访问 进行屏蔽

方法见: http://my.oschina.net/kjpioo/blog/162696

相关文章
相关标签/搜索