Original solution found on Francois Deschenes blog
You have just enabled the native Apache server on OSX Yosemite.
Now you observe permissions issues when trying to read or write your files.
This problem can be solved by setting _www, the Apache user, as the owner of your document root:
sudo chmod -R +a '_www allow read,write,delete,add_file,add_subdirectory,file_inherit,directory_inherit' [your_doc_root]Then you can allow the _www group to edit the doc root:
chmod -R g+w [your_doc_root]And finally, add your own user to the _www group:
sudo dseditgroup -o edit -a `whoami` -t user _www
# This will be useful if you want to edit or remove files that have been created by PHP (cache files, uploaded data...) from the Finder.