Apache和SFTP权限在Ubuntu字preSS自动更新 [英] apache and sftp permissions for wordpress automatic update in ubuntu

查看:210
本文介绍了Apache和SFTP权限在Ubuntu字preSS自动更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我第一次试图建立的Word preSS或在云托管任意网站。我是Ubuntu的服务器上,和Word preSS位于无功/网络/ MYDOMAIN /公用文件夹。

It's my first time trying to set up Wordpress or any website on a cloud hosting. I am on Ubuntu server, and Wordpress is located in var/www/mydomain/public folder.

我想实现的是:这两个词preSS(PHP)和SFTP用户可以访问和修改相同的文件。和Word preSS应该能够做到这对插件自动更新等。

What I want to achieve is this: Both Wordpress (PHP) and SFTP users can access and modify the same files. And Wordpress should be able to do it's automatic update for plugins, etc.

这是我迄今所做的:


  • 我这个文件夹chmodded 775允许组读/写权限。

  • 我已经加入apache用户(www数据)和SFTP用户(的suser)既要组WP。

  • 我已经WP作为字preSS文件夹中的所有文件的组所有者。

什么工作:


  • 我可以编辑的主题和插件文件与Word preSS内置的主题/插件编辑器。

什么不工作:


  • 字preSS更新仍要求的FTP细节进行更新

  • 当我创建SFTP用户一个新的文件,它的权限将是644,但他们应该是775

我已经试过


  • 我已经尝试了这里所有的步骤(由CAF答案):<一href=\"http://stackoverflow.com/questions/1113691/a-general-linux-file-permissions-question-apache-and-word$p$pss\">A一般linux文件权限问题:Apache和字preSS

  • 我已经试过这样: HTTP://jeff.robbins本页面/用品/设置最的umask换SFTP-交易

  • 我也尝试添加的umask 002到我的SFTP启动的登录文件,但我不知道它们的位置。

据我了解,问题在于与地方的权限/ umask的事情。我知道关于Linux很少所以这可能是一个简单的解决方案,一个愚蠢的问题,但我不知道如何解决它。

As far as I understand, the problem lies somewhere with the permissions/umask thing. I know very little about linux so this may be a stupid question with a simple solution, but I have no idea how to fix it.

更新:我不知道我将不得不重新启动SSH服务器。我做了这个命令/etc/init.d/ssh重启和文件,SFTP创建后有权限664(因为他们应该)
此外,似乎阿帕奇必须重新启动为好,用这个命令: /etc/init.d/apache2重启

UPDATE: I did not know that I would have to restart the ssh server. I did it with this command /etc/init.d/ssh restart and after that files created with SFTP have permissions 664 (as they are supposed to) Also, it seems that Apache has to be restarted as well, with this command: /etc/init.d/apache2 restart

但是,Word preSS的还是的不会做自动更新(要求FTP凭证)

However, Wordpress still won't do automatic update (asks for FTP credentials)

推荐答案

如果你能安装SSH2 PHP模块字preSS然后会给你在SFTP升级选项。

If you're able to install the SSH2 PHP Module Wordpress will then give you the option to upgrade over SFTP.

在Ubuntu的:

sudo apt-get install libssh2-php

在CentOS的(EPEL必填):

In CentOS (EPEL required):

sudo yum install php-pecl-ssh2

这篇关于Apache和SFTP权限在Ubuntu字preSS自动更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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