MAMP — File Permissions for a Local Development Environment
If you use MAMP you’ll probably run into the issue of having to frequently toggle back and forth between file ownership permissions.
The easy way to avoid this is to grant group access to MAMP which runs as ‘_www’. You can achieve this by modifying the file permissions in OS X.
Here’s how to get around the problem:
Go to your server root or project folder in Finder by clicking on the Disk location shortcut in MAMP.
Right click on the project folder and select ‘Get Info’ or use the shortcut — command + i
Next, option + click on the ‘+’ sign in the bottom left of the window.
Scroll down and select the individual ‘World Wide Web Server’ user (note: single user icon, not group) from the popup menu — This will add the ‘_www’ user to the group.
Be sure to grant read and write privileges to the newly added ‘_www’ user.
Lastly return to MAMP and set the current owner to your ‘default user account’ and group to ‘www’.
Tada! No more hair-pulling!
Leave me a comment if you’ve found this post useful.