Make a directory writable by Apache in Mac OS X Maverick
This is something many newbies struggle with (been there).
Here's a quick reference on how to make a directory writable by Apache in Mac OS X without giving full permissions to everyone a.k.a chmod -R 777.
Step 1
Set the ownership of your desired directory/file to the _www user:
sudo chown -R _www:staff path/to/folder
Step 2
Set the permissions so that the _www can write in the directory/file without giving permissions to everyone else:
sudo chmod -R 755 path/to/folder
Problem solved.
Happy coding :-)
Note: Works fine with built-in OSX apache, not tested with apps such as MAMP/XAMPP or Homebrew/MacPorts apache installs.
Written by Julien Charette
Related protips
2 Responses
Superb! That helped me! Thanks a lot!
over 1 year ago
·
One of the quickest fixes I've ever tracked down - thanks for posting it!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Osx
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#