Permissions for local development with git and MAM

2020-03-30 23:18发布

问题:

I'm setting up a new machine on a clean account. I'm developing locally on a Mac (OSX 10.8.2) with MAMP Pro and I use git for version control. I'm having a permissions problem...

MAMP Pro allows you to set permission to the host directory using the following dialog:

When I set the owner to myself (ESL) and the group to "Admin" git works happily, but Wordpress updates on my local machine aren't able to run normally (I get prompted for ftp credentials).

When I set the owner and group to "www", Wordpress updates smoothly, but git throws "Permission denied" errors such as:

ESL$ git checkout master
fatal: Unable to create '/Applications/MAMP/htdocs/streetofwalls/.git/index.lock': Permission denied

I'm stuck because I need Wordpress to run normally as well as git. Any ideas why I'm having this problem and/or how to fix it?

回答1:

Allow everybody to write there. It’s just local dev machine, right?