How do I know which linux user Wordpress uses for plugin installation

我与影子孤独终老i 提交于 2019-11-30 03:58:40
Ryan

On your production server, in your WordPress index.php file, at the top, you can temporarily put echo(exec("whoami"));die();

Then browse to your WordPress site and see what user was running. On Ubuntu, mine was www-data.

This was useful for me for: Can I install/update WordPress plugins without providing FTP access?

The Wordpress user is also the web server user, so this should work:

ps -ef | grep http

or

ps -ef | grep apache

So it clearly says that a group has no W access.

You can do: chmod -R g+w /your/plugins/dir

And then, nginx group will be able to write there.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!