我如何知道哪些linux用户Wordpress用于插件安装 [英] How do I know which linux user Wordpress uses for plugin installation

查看:226
本文介绍了我如何知道哪些linux用户Wordpress用于插件安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试设置Wordpress以便能够通过SFTP(SSH)在Centos 6 VPS上安装插件。



我已经能够修改 wp-config ,所以它使用正确的凭证 user 作为我的SFTP用户。



现在我有一个权限相关的问题,好像我在 wp-content chmod 777 c>文件夹我可以安装,但具有正常的权限,它不能创建文件夹。



我使用Nginx和我的所有

c $ c>但是它不工作。



我也尝试将用户设置为 nginx 运气。



更新:我发现wordpress使用 apache 作为用户,但我想把它改为my user

解决方案

在您的生产服务器上,在WordPress index.php文件的顶部,暂时将 echo(exec(whoami)); die();



然后浏览到您的WordPress网站并查看用户运行的是什么。在Ubuntu上,我的 www-data



这对我有用:我可以安装/更新wordpress插件而不提供ftp访问吗? p>

I'm trying to setup Wordpress to be able to install plugins via SFTP (SSH) on a Centos 6 VPS.

I've been able to modify wp-config so it uses the right credentials with user as my SFTP user.

Now I have a permission related problem, as if I do a chmod 777 on my wp-content folder I'm able to install, but with the normal permissions it can't create folders.

I'm using Nginx and all my wp-content files and folders are owned by user and I've tried setting the group to nginx but it doesn't work.

I also tried setting the user as nginx but still no luck.

UPDATE : I found out wordpress was using apache as user but I want to change this to my user instead. How can I do this ?

解决方案

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?

这篇关于我如何知道哪些linux用户Wordpress用于插件安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆