Mac OSX Apache Write Privileges [closed]

久未见 提交于 2019-12-05 02:51:43

问题


So here is my problem. Its started when I discovered that I couldn't install plugins or themes in WordPress from the admin panel, it just kept asking for my connection info ( http://cl.ly/DLdH/o ).

I found a blog post which suggested changing the ownership of the wordpress folder to the Apache user, i.e. _www like so

sudo chown -R _www ./

That did, partially, fix the problem as I was able to install plugins and themes as well as writing to the directory through PHP which was all good but then I couldn't add/delete/edit any of the files in my text editor or even in Finder. It just keeps asking for my user password in order to process the action.

Changing the ownership back fixes the password issue but then I cant do any writing to the directory though PHP anymore.

Is there a way to allow me do both things at the same time?

EDIT:

I came across this cmd

sudo dscl . -append /Groups/_www GroupMembership [myUsername]

which added me i.e. my username to the group _www, then I executed

sudo chown -R _www .
sudo chgrp -R _www .

then it worked!


回答1:


Have the user own the files. Change the group to _www. Give write permission to group.

chown -R <username> .
chgrp -R _www .
chmod -R g+w .


来源:https://stackoverflow.com/questions/8862345/mac-osx-apache-write-privileges

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