smdahlen/vagrant-hostmanager — pull request #48 by pbitty (2013-11-04 21:58:34+00:00)
Title: elevate privileges in Windows host if necessary

This change makes the plugin try to overwrite the hosts file with elevated privileges in a Windows **host** if it gets an 'access denied' when trying to copy it normally. This allows you to use the plugin without any permission workarounds in windows.

This has proved useful to me, and I'm wondering if it would be useful to you or anyone else.

Before these changes, I had these options:
* *relax the permissions on the hosts file so it is writable without elevated privileges*
This is not ideal for security reasons as any app running under my user can now edit the hosts file without my knowledge.

* *run vagrant with elevated privileges*
This is inconvenient because VirtualBox can't run with 'regular' privileges and elevated privileges at the same time. If VirtualBox is already running with regular privileges, you can't launch it elevated - and vice-versa. So to manage any VM I have to remember to call 'cmd' with 'Run as admin...'

Are there other workarounds I don't know about?