gasmask icon indicating copy to clipboard operation
gasmask copied to clipboard

Gas Mask sets ACL on /etc/hosts; breaks other tools like vagrant

Open johnkeates opened this issue 7 years ago • 4 comments

By using Gas Mask, an ACL is set on /etc/hosts for the current user that started Gas Mask. This causes nobody else to be able to write to /etc/hosts, effectively locking out any/everything else.

People using vagrant and plugins to automatically add/remove hosts via vagrant-hostupdater, vagrant-hostmanager and other types of plugins get crashes because the system can't use sudo anymore to add/remove hosts entries. Removing the ACL fixes this, but every time Gas Mask is used, the ACL gets set again.

Basically, I've been copy/pasting this line forever for people that report a bug with their tooling when in fact it's the ACL that is the problem:

Check with ls -le /etc/hosts and delete the ACL with sudo chmod -N /etc/hosts

Is there a way for Gas Mask to not set this ACL?

johnkeates avatar Jun 29 '17 06:06 johnkeates

Yep. Had to remove Gas Mask because of this very issue. Lovely program, but I can't rely on it so long as it locks up /etc/hosts. Please remedy this.

metaColin avatar Jul 21 '17 17:07 metaColin

Even an option to prompt for password to make changes would be better. I've gone back to manual editing as well because I am always spinning up and shutting down vagrant VMs using the hosts updater plugin

surrealchemist avatar Sep 21 '17 14:09 surrealchemist

Every six months or so I find my self coming back to this issue after a long google search to try and trace the reason why Vagrant can't edit my hosts file :( Sucks that I have to uninstall Gas Mask to get it working.

drawcard avatar Jan 17 '18 09:01 drawcard

Bit me again :(

Leland avatar Sep 10 '18 16:09 Leland