Closed denizdogan closed 7 years ago
Solved this by doing sudo chmod go+r /etc/hosts
(add read access to group and others)
I have the same problem and same configuration, however sudo chmod go+r /etc/hosts
does not seem to fix the issue.
/etc/sudoers.d/vagrant_hostmanager
contains:
Cmnd_Alias VAGRANT_HOSTMANAGER_UPDATE = /bin/cp /users/Cibulka/.vagrant.d/tmp/hosts.local /etc/hosts
%admin ALL=(root) NOPASSWD: VAGRANT_HOSTMANAGER_UPDATE
My user is part of the admin
group:
$ groups cibulka
staff com.apple.sharepoint.group.1 everyone localaccounts _appserverusr admin _appserveradm _lpadmin _appstore _lpoperator _developer _analyticsusers com.apple.access_ftp com.apple.access_screensharing com.apple.access_ssh
My ~/.vagrant.d/tmp/
directory is not empty. Should it be?
$ cd cd ~/.vagrant.d/tmp/
$ ls
hosts.default hosts.local
These are the plugins I use:
$ vagrant plugin list
vagrant-bindfs (1.0.2)
- Version Constraint: > 0
vagrant-hostmanager (1.8.5)
- Version Constraint: > 0
vagrant-share (1.1.6)
- Version Constraint: > 0
vagrant-vbguest (0.13.0)
- Version Constraint: > 0
I've ran the command @denizdogan suggested, but it does not seem to fix the issue. What have I done wrong?
Thanks in advance!
It seems, that sudo prompt did not come from vagrant-hostmanager
, but from Vagrant NFS setup (I think?).
Anyway, this answer on StackOverflow fixed that for me: https://askubuntu.com/a/519841/737192
Sorry for barking up the wrong tree!
It seems that vagrant-hostmanager has a permission problem in updating /etc/hosts on the host machine. This is the first time I've encountered this.
I'm using Vagrant 2.0.1 with VirtualBox 5.1.30, both clean installs, on macOS High Sierra 10.13.2 Developer Beta.
/etc/sudoers.d/vagrant_hostmanager
contains:My user is part of the
admin
group:The
~/.vagrant.d/tmp/
directory is empty:These are the plugins I use:
Here is my
Vagrantfile
:Here is the full output: