vagrant-hostmanager icon indicating copy to clipboard operation
vagrant-hostmanager copied to clipboard

No prompt is given to sudo, vagrant up fails.

Open stephenreay opened this issue 6 years ago • 1 comments
trafficstars

When attempting to vagrant up (on a machine that has been vagrant destroy'd, and worked fine previously) I now get an error when vagrant-hostmanager tries to update the hosts file on the host machine:

/opt/vagrant/embedded/lib/ruby/2.4.0/fileutils.rb:1289:in `initialize': Permission denied @ rb_sysopen - /etc/hosts (Errno::EACCES)
	from /opt/vagrant/embedded/lib/ruby/2.4.0/fileutils.rb:1289:in `open'
	from /opt/vagrant/embedded/lib/ruby/2.4.0/fileutils.rb:1289:in `copy_file'
	from /opt/vagrant/embedded/lib/ruby/2.4.0/fileutils.rb:430:in `copy_file'
	from /opt/vagrant/embedded/lib/ruby/2.4.0/fileutils.rb:357:in `block in cp'
	from /opt/vagrant/embedded/lib/ruby/2.4.0/fileutils.rb:1461:in `block in fu_each_src_dest'
	from /opt/vagrant/embedded/lib/ruby/2.4.0/fileutils.rb:1477:in `fu_each_src_dest0'
	from /opt/vagrant/embedded/lib/ruby/2.4.0/fileutils.rb:1459:in `fu_each_src_dest'
	from /opt/vagrant/embedded/lib/ruby/2.4.0/fileutils.rb:356:in `cp'
	....

stephenreay avatar Dec 11 '18 15:12 stephenreay

Hello @stephenreay, try running vagrant global-status --prune

seth-reeser avatar Mar 13 '19 18:03 seth-reeser