开发者

How to add a user to apache group on Mac Os X?

开发者 https://www.devze.com 2023-01-30 18:43 出处:网络
I\'m actually trying to run Symfony2 on my MacBook Pro (Mac OS X 10.6). When i launch my application by apache, all cache and log file are created by the _www:_www user/gro开发者_高级运维up.

I'm actually trying to run Symfony2 on my MacBook Pro (Mac OS X 10.6).

When i launch my application by apache, all cache and log file are created by the _www:_www user/gro开发者_高级运维up. But, i already have to edit these files in the CLI, with my own user.

My question is : how to add my user to the _www group ?

I have tried to edit the /etc/group to add my user name to _www group, restart apache : fail I have also tried to edit /etc/apache2/httpd.conf to change user and group used by Apache : complete error acces.

Anyone have an idea ?


sudo dseditgroup -o edit -a your_username -t user _www


I'd suggest the same as above but here's a bit more copy/paste friendly version:

sudo dseditgroup -o edit -a `whoami` -t user _www


I was facing the same issue just to make it global on your personal mac not production i would suggest to run this and you will never have to do chmod again

sudo dseditgroup -o edit -a _www -t user staff

0

精彩评论

暂无评论...
验证码 换一张
取 消