4

I went through all the steps from this manual of how to setup Homestead. I've got a problem, when I try to run the vagrant box:

mysystem@me:~/Google Drive/Homestead$ vagrant up
Vagrant failed to initialize at a very early stage:

The home directory you specified is not accessible. The home
directory that Vagrant uses must be both readable and writable.

You specified: /home/mysystem/.vagrant.d

I tried putting the Homestead folder in different places of the system. The Google Drive folder is readable/writable - I create files/folders there without the sudo command. Maybe I am not trying to fix the correct thing, I don't know. This is my Homestead.yaml file:

authorize: ~/Google\ Drive/Homestead/.ssh/id_rsa.pub

keys:
    - ~/Google\ Drive/Homestead/.ssh/id_rsa

folders:
    - map: ~/Google\ Drive/Homestead/workspace
      to: /home/vagrant/Code

sites:
    - map: test.app
      to: /home/vagrant/Code/test/public

variables:
    - key: APP_ENV
      value: local

and the SSH key file that I generated is ~/Google\ Drive/Homestead/homestead_key.pub

2 Answers 2

6

Ok, for those who might have the same problem, here's the solution and explanation for it:

Running the command whoami; ls -dlah ~/.vagrant.d/ showed me drwxr-xr-x 7 root root result indicating that the vagrant folder is owned by root, which was causing the problem of it being not accessible.

The command sudo chown -R yourusername:yourusername ~/.vagrant.d will fix the problem. :)

1

I had the same symptoms specified above but with a different solution. I had set the environment variable "VAGRANT_HOME" to something I used in the script. This caused vagrant to look in the director I specified instead of its true home directory. Once I changed my environment variable to something else all was fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .