Nginx php-fpm和自动更新?

时间:2017-04-13 作者:Andrew Newby

我想知道如何让Wordpress在我的服务器上更新,而不需要FTP凭据。在里面/etc/php/7.0/fpm/pool.d/www.conf 我有:

listen.owner = www-data
listen.group = www-data
我认为问题在于VestaCP的文件设置方式:

root@com:/home/rachel/web/site.co.uk/public_shtml# ls -lh
total 243M
drwxrwxr-x 11 rachel rachel 4.0K Feb  3  2016 admin
drwxrwxr-x  2 rachel rachel 4.0K Apr 12 09:14 cgi-bin
drwxrwxr-x  3 rachel rachel 4.0K Jan 28  2016 dir
-rw-rw-r--  1 rachel rachel  418 Sep 25  2013 index.php
-rw-r--r--  1 rachel rachel 2.1K Apr  6 09:15 optimize.cgi
drwxr-x--x  2 rachel rachel 4.0K Apr 12 09:12 public_shtml
它们的“所有者”实际上是用户的帐户用户名。我是sure 这必须是可能的(否则每个文件都必须由www数据所有,这会导致各种其他问题)

我是不是太傻了?

UPDATE:

正如建议的那样,我尝试了:

sudo usermod -aG www-data rachel

不幸的是,我仍然得到错误:

PASS: Your WordPress install can communicate with WordPress.org securely.
PASS: No version control systems were detected.
FAIL: Your installation of WordPress prompts for FTP credentials to perform updates. (Your site is performing updates over FTP due to file ownership. Talk to your hosting company.)

2 个回复
SO网友:Niels van Renselaar

你不应该将rachel添加到www数据组吗?

sudo usermod -aG www-data rachel
更多详细信息https://stackoverflow.com/a/19620585/1173445

SO网友:ciaika

尝试运行以下命令:

sudo chown www-data:www-data /home/rachel/web/site.co.uk/public_shtml -R

sudo chmod g+w /home/rachel/web/site.co.uk/public_shtml -R

相关推荐

Docker化的Wordpress出现了Nginx代理问题

我有一个停靠的Nginx代理,它位于我的服务器上。我的一个网站是Docker Compose Wordpress网站。它们是单独的容器,必须保持这种状态。When I update my Site Url in the Settings I can still log into my Admin Dashboard, but I cannot reach my actual site. I receive a 502 Gateway Error from Nginx. Nginx服务器块: serv