/etc/hosts file permission Mamp Pro

I'm running MAMP and it's telling me that it can't write to the /etc/hosts file. I'm guessing it's a permission issue but not totally sure. This is the error:

The file /etc/hosts couldn't be written

Any thoughts?


Solution 1:

Go to your hosts file (/etc/hosts) and delete this line

127.0.0.1 (null)

Solution 2:

On you mac, via the go to folder command (or cmd-shift-g) go to /etc/hosts. You will likely find that your hosts file is locked. Do a get info (cmd-i) on the file and uncheck 'locked'. Also check to see if you have write or read-only permissions under "Sharing and permissions". This is what I did and now my MAMP Pro works 100%

Solution 3:

You might want to read this: http://www.justincarmony.com/blog/2011/07/27/mac-os-x-lion-etc-hosts-bugs-and-dns-resolution/