一般linux文件权限问题:Apache和字preSS [英] A general linux file permissions question: Apache and WordPress
问题描述
我从几个星期前,一个共享的主机到VPS和我在使用Word preSS这些恼人的权限问题移动。你知道你可以下载和升级,从管理面板插件(和字preSS本身),但因为我把它开始问我我的FTP凭据,这是有点当我有更新〜20插件放缓。
我想这应该是某种权利的问题。我看了看,该共享主机字preSS文件,它们都属于用户名和组kovshenin(kovshenin:kovshenin)和文件是-rw-R - R--和目录是drwx-R-xr- [X]。
在我的VPS Apache下运行Apache:Apache和我的文件kovshenin:kovshenin。我应该怎么做,使他们双方kovshenin和Apache?
可读可写另外,我改变了权限,以0777的所有文件和我的话preSS的安装文件夹,这让我安装和无FTP删除插件,但是当我推到自动升级到Word preSS 2.8 .1还是问我的FTP帐户。那是一个WP的问题还是我错过了什么?
感谢。
更新:我设法运行 ID
和 ID www数据
的MEDIATEMPLE共同主办。用户kovshenin是组kovshenin和WWW的数据组www数据。没有更多的群体。有什么诀窍?
另一个更新好吧,我增加了阿帕奇
用户在 kovshenin
组,我的话preSS文件 kovshenin:kovshenin
与 RW-RW-R -
权限和 drwxrwxr-X
上的目录的权限,但事情仍然是错误的。用户阿帕奇
可以访问这些文件和文件夹,我可以用这个词preSS管理面板在线主题和插件编辑器,我能够更改从字preSS内的.htaccess文件,但插件/主题安装仍然要求我要FTP凭据!
任何想法?谢谢你。
我应该怎么做,使他们双方kovshenin和Apache?
可读可写
块引用>
- 创建一个新的组,说字preSS。
- 都koveshenin和www数据用户添加到单词preSS组。
- (使用chgrp命令)更改的所有文件的组所有者字preSS。
- 确保所有文件组可写的。
- 设置G + S(setgid)的权限位感兴趣的所有的目录。
- 确保kovshenin和Apache的默认的umask包括组读取和放大器;写权限。
第二个最后一步是的伎俩。这意味着,只要kovshenin或Apache建立在这些目录中的文件,该组拥有者将被设置为字preSS(而不是kovshenin或Apache)。
I moved from a shared hosting to a VPS a few weeks ago and I'm having these annoying permission issues with WordPress. You know you can download and upgrade plugins (and wordpress itself) from the admin panel, but since I moved it started asking me my FTP credentials, which is kinda slow when I have to update ~20 plugins.
I think this should be some kind of rights issue. I looked that the shared hosting wordpress files, they all belong to the username and group kovshenin (kovshenin:kovshenin) and the files are -rw-r--r-- and the directories are drwx-r-xr-x.
On my VPS apache runs under apache:apache and my files are kovshenin:kovshenin. What should I do to make them readable and writable by both kovshenin and apache?
Also, I changed the permissions to 0777 for all files and folders of my wordpress installation, that allowed me to install and delete plugins without FTP, but when I pushed to automatic upgrade to WordPress 2.8.1 it still asked me for my FTP account. Is that a wp issue or did I miss something?
Thanks.
Update: I managed to run
id
andid www-data
on the MediaTemple shared hosting. User kovshenin is in group kovshenin, and www-data is in group www-data. No more groups. What's the trick?Another update Okay, I added the
apache
user to thekovshenin
group, my wordpress files arekovshenin:kovshenin
withrw-rw-r--
permissions anddrwxrwxr-x
permissions on directories, but something is still wrong. The userapache
can access the files and folders, I can use the online Themes and Plugins editor in the wordpress admin panel, I'm able to make changes to the .htaccess file from within wordpress, but plugin/theme installation still asks me for FTP credentials!Any ideas? Thanks.
解决方案What should I do to make them readable and writable by both kovshenin and apache?
- Create a new group, say "wordpress".
- Add both koveshenin and www-data users to the wordpress group.
- Change the group owner of all the files to wordpress (using chgrp).
- Make sure all the files are group writeable.
- Set the g+s (setgid) permission bit on all the directories of interest.
- Make sure kovshenin and apache's default umask includes group read & write permission.
The second last step is the trick. It means that whenever kovshenin or apache creates a file in those directories, the group owner will be set to wordpress (instead of kovshenin or apache).
这篇关于一般linux文件权限问题:Apache和字preSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!