1

Since yesterday, my /etc/hosts file disappears "magically" on restart. When I recreate it via sudo vim hosts everything works, but it's gone once I restart. I'm on Mac OSX 10.6.8, running MAMP 1.9.4 (recently added new virtual hosts, worked without problems before). After every restart /etc/hosts and /private/etc/hosts show only these:

hostconfig
hostconfig~orig 
hosts.ac
hosts~orig

The ~orig files are my own backups, I'm aware of the hosts.ac issue and have thus created hosts.ac as a link file (ln - alias of hosts). However now it's just empty, because hosts is not there. Any ideas?

Christian Macht
  • 485
  • 1
  • 5
  • 16

1 Answers1

1

Well, I opened the Console applications to check the logs on startup and here is the "magic" that happened:

4/9/12 12:02:05 PM  vpnagent[47]    Restoring backup hosts file: /etc/hosts.ac

D'uh. hosts.ac is an empty link file and overwrites hosts at every startup. Hence, no hosts file after startup. I just reversed the link (hosts.ac links to hosts), restarted and it worked. Question is answered.

Christian Macht
  • 485
  • 1
  • 5
  • 16