I have just set up a new Linux box and trying to install vagrant on it. The issue is that when I am running vagrant up command, I am getting the following error:
Vagrant failed to initialize at a very early stage:
The directory Vagrant will use to store local environment-specific state is not accessible. The directory specified as the local data directory must be both readable and writable for the user that is running Vagrant.
Any idea how to fix this?
I think a better way is to provide your user the required permission to the directory by making the user the owner - where you want the vagrant
to be booted:
$ sudo chown -R <user> <directory>
and then you will be easily able to do:
$ vagrant up
Using sudo
for vagrant up
is unusual as why do you want to run your virtual machine as a root user.