我根据配置了文件权限here 像这样。
apache
用户运行服务器和wordpress
用户拥有目录,此用户仅用于此网站。
drwxr-xr-x 5 wordpress wordpress 4096 Apr 12 01:12 .
drwxr-xr-x 10 root root 4096 Apr 10 16:19 ..
-rw-r--r-- 1 wordpress wordpress 418 Sep 25 2013 index.php
-rw-r--r-- 1 wordpress wordpress 19929 Jan 18 2013 license.txt
-rw-r--r-- 1 wordpress wordpress 3193 Jan 27 20:18 readme-ja.html
-rw-r--r-- 1 wordpress wordpress 10156 Jan 27 20:18 readme.html
-rw-r--r-- 1 wordpress wordpress 4892 Oct 4 2013 wp-activate.php
drwxr-xr-x 9 wordpress wordpress 4096 Jan 27 20:18 wp-admin
-rw-r--r-- 1 wordpress wordpress 271 Jan 9 2012 wp-blog-header.php
-rw-r--r-- 1 wordpress wordpress 4795 Sep 6 2013 wp-comments-post.php
-rw-r--r-- 1 wordpress wordpress 4255 Jan 27 20:18 wp-config-sample.php
-r--r----- 1 wordpress wordpress 4471 Apr 12 01:12 wp-config.php
drwxrws--- 5 wordpress wordpress 4096 Apr 12 11:41 wp-content
-rw-r--r-- 1 wordpress wordpress 2932 Sep 25 2013 wp-cron.php
drwxr-xr-x 12 wordpress wordpress 4096 Jan 27 20:18 wp-includes
-rw-r--r-- 1 wordpress wordpress 2380 Oct 25 07:58 wp-links-opml.php
-rw-r--r-- 1 wordpress wordpress 2359 Oct 25 07:58 wp-load.php
-rw-r--r-- 1 wordpress wordpress 31909 Dec 4 05:12 wp-login.php
-rw-r--r-- 1 wordpress wordpress 8235 Nov 13 20:58 wp-mail.php
-rw-r--r-- 1 wordpress wordpress 10880 Nov 5 09:24 wp-settings.php
-rw-r--r-- 1 wordpress wordpress 25665 Nov 13 12:23 wp-signup.php
-rw-r--r-- 1 wordpress wordpress 4026 Oct 25 07:58 wp-trackback.php
-rw-r--r-- 1 wordpress wordpress 3015 Oct 25 11:29 xmlrpc.php
$ ls -la wp-content/
total 24
drwxrws--- 5 wordpress wordpress 4096 Apr 12 11:41 .
drwxr-xr-x 5 wordpress wordpress 4096 Apr 12 01:12 ..
-rw-rw---- 1 wordpress wordpress 28 Jan 9 2012 index.php
drwxr-xr-x 3 wordpress wordpress 4096 Jan 27 20:18 languages
drwxr-x--- 4 wordpress wordpress 4096 Jan 27 20:18 plugins
drwxrws--- 5 wordpress wordpress 4096 Jan 27 20:18 themes
和添加
apache
用户至
wordpress
组
$ id apache
uid=48(apache) gid=48(apache) groups=48(apache),503(wordpress)
但有了这些权限,我无法更新wordpress本身或插件。哪个目录应该是可写的,以便正确更新并尽可能保持安全?