0

When I am trying to generate a new feature on local, it runs in permissions issue beginning with

Warning: mkdir(): Permission denied in features_export_build_form_submit()

There is no www-data user on local. My environment is Mac OSX Mountain Lion.

This is an extension of this question Folder permissions, owner/groups

Which deals with a similar issue on the server level. I am looking for the response for my local.

Current permissions for sites/all/modules/features are

drwxr-xr-x 22 myusername wheel 748 Aug 7 16:41 features

wheel is the group and root is its user.

Thus what user should own this directory to not run in to the mkdir permissions denied issue on Drupal frontend?

Thanks.

3
  • What flavor of server stack are you running on your local dev environment (mamp, xampp etc)?
    – F1234k
    Commented Aug 11, 2014 at 23:54
  • So what user is used by your webserver? And why, oh why, would any folder belong to :wheel?
    – Mołot
    Commented Aug 12, 2014 at 6:59
  • Why is it wheel? Well thats how Mac rolls !
    – pal4life
    Commented Aug 12, 2014 at 14:51

1 Answer 1

3

The point is that your folder needs to runs under the _www group (www-data is the group and user for linux machine). You can do it within a terminal or with the finder too. So find the webserver root folder (~/Sites/MYDRUPALSITES, for example) and pull up the Finder Get Info window.

Then on the bottom left corner, click the group icon (The picture with 2 people) and then hold Option then click the “+” button. This will allow you to select system users and groups. Find the World Wide Web group, select that and change the group priviledge to “Read & Write” and then use the cog-wheel to “Apply to enclosed items…”

Or just run the following chgrp (change group) command via Terminal : easiest way (y) !

cd ~/Sites

sudo chgrp -R _www MYDRUPALSITES/

That's the most revelant answer I can answer with your question. But it can also be the owner or a bad installation permissions set. Simple google : permission issue mamp/xammp. Or you could also run

sudo chmod 777 -R MYDRUPALSITES/

But I clearly do not recommend it on a online production (in local it's "acceptable").

3
  • So you are suggesting changing the group ownership to _www since that is what Apache uses it seems and thats how Drupal tries to execute in the front end as well. I saw that there is also a _www user as well. But I suppose letting my username own the files and _wwww have the group ownership would be nice.
    – pal4life
    Commented Aug 12, 2014 at 14:49
  • Yes, if everything is well configured, it will work... You can let your username as the owner of the folder and change the group ownership. Just remember to give the right permissions for the group (most of time permission by default are okay). I can't really go in a brief explication if you don't know how permission and owner work. But I invite you to have a look on this page.
    – JudaPriest
    Commented Aug 14, 2014 at 8:03
  • :) I do know about that stuff thats how I can take about owner and group in the first place. Thanks for the answer here.
    – pal4life
    Commented Aug 14, 2014 at 20:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.