Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 7681  / 3 Years ago, sat, october 2, 2021, 11:19:22

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


More From » ssh

 Answers
0

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. :)


[#22953] Sunday, October 3, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ligenvirt

Total Points: 238
Total Questions: 98
Total Answers: 100

Location: Senegal
Member since Fri, Aug 21, 2020
4 Years ago
;