【发布时间】:2012-10-01 09:45:24
【问题描述】:
我已经阅读了http://codex.wordpress.org/Hardening_WordPress,但我无法理解它。应设置哪些权限以及由谁拥有?现在我已经设置为以下命令的结果:
# reset to safe defaults
find /usr/share/wordpress -exec chown www-data:www-data {} \;
find /usr/share/wordpress -type d -exec chmod 755 {} \;
find /usr/share/wordpress -type f -exec chmod 644 {} \;
# allow wordpress to manage wp-config.php (but prevent world access)
chgrp www-data /usr/share/wordpress/wp-config.php
chmod 660 /usr/share/wordpress/wp-config.php
# allow wordpress to manage .htaccess
chgrp www-data /usr/share/wordpress/.htaccess
chmod 664 /usr/share/wordpress/.htaccess
# allow wordpress to manage wp-content
find /usr/share/wordpress/wp-content -exec chgrp www-data {} \;
find /usr/share/wordpress/wp-content -type d -exec chmod 775 {} \;
find /usr/share/wordpress/wp-content -type f -exec chmod 664 {} \;
在此配置后,安装将无法使用。有什么建议吗?
【问题讨论】:
-
您是在 ubuntu 中使用自己的服务器还是使用虚拟主机站点?
标签: wordpress security ubuntu permissions