Vvv: Permission denied on vagrant up with Ubuntu 12.04

Created on 23 Jan 2014  ·  13Comments  ·  Source: Varying-Vagrant-Vagrants/VVV

OS: Ubuntu 12.04 LTS
Vagrant: 1.4.3
VirtualBox: 4.2.22

Just trying to get VVV up and running and the install appeared to go smoothly until it came to 'vagrant up' which produced the following;

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'precise32'...
Progress: 90%/opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/machine.rb:204:in `initialize': Permission denied - /home/philipjohn/vagrant-local/.vagrant/machines/default/virtualbox/id (Errno::EACCES)
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/machine.rb:204:in `open'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/machine.rb:204:in `open'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/machine.rb:204:in `id='
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/action/import.rb:15:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/action/customize.rb:40:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/call.rb:57:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/machine.rb:147:in `action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'

I tried,

  • CHMOD the entire vagrant-local dir to 777
  • 'sudo vagrant up'
  • completely uninstall everything and try again but using sudo
  • $ chmod -R 777 /opt/vagrant

I still get the same issue whatever I try. Any ideas why this might be and how I can resolve?

Cheers

question

Most helpful comment

$ find /home/philipjohn/vagrant-local/.vagrant/machines/ -exec ls -al {} \;
total 12
drwxrwxr-x 3 philipjohn philipjohn 4096 Jan 18 20:29 .
drwxrwxr-x 3 philipjohn philipjohn 4096 Jan 18 20:29 ..
drwxrwxr-x 3 philipjohn philipjohn 4096 Jan 18 20:29 default
total 12
drwxrwxr-x 3 philipjohn philipjohn 4096 Jan 18 20:29 .
drwxrwxr-x 3 philipjohn philipjohn 4096 Jan 18 20:29 ..
drwxrwxrwx 2 philipjohn philipjohn 4096 Jan 18 20:33 virtualbox
total 32
drwxrwxrwx 2 philipjohn philipjohn 4096 Jan 18 20:33 .
drwxrwxr-x 3 philipjohn philipjohn 4096 Jan 18 20:29 ..
-rw-r--r-- 1 root       root         10 Jan 18 20:33 action_set_name
-rw-r--r-- 1 root       root         36 Jan 18 20:32 id
-rw-r--r-- 1 root root 36 Jan 18 20:32 /home/philipjohn/vagrant-local/.vagrant/machines/default/virtualbox/id
-rw-r--r-- 1 root root 10 Jan 18 20:33 /home/philipjohn/vagrant-local/.vagrant/machines/default/virtualbox/action_set_name

so I did this;

sudo chown philipjohn:philipjohn /home/philipjohn/vagrant-local/.vagrant/machines/default/virtualbox/id
sudo chown philipjohn:philipjohn /home/philipjohn/vagrant-local/.vagrant/machines/default/virtualbox/action_set_name

..and it works now, yay!

Thanks :+1:

All 13 comments

@philipjohn:
Sounds like a permissions issue with the precise32 box. Do this:

find /home/philipjohn/vagrant-local/.vagrant/machines/ -exec ls -al {} \;

Report back with the results.

On Thu, Jan 23, 2014 at 4:09 AM, philipjohn [email protected]:

OS: Ubuntu 12.04 LTS
Vagrant: 1.4.3
VirtualBox: 4.2.22

Just trying to get VVV up and running and the install appeared to go
smoothly until it came to 'vagrant up' which produced the following;

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'precise32'...
Progress: 90%/opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/machine.rb:204:in initialize': Permission denied - /home/philipjohn/vagrant-local/.vagrant/machines/default/virtualbox/id (Errno::EACCES) from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/machine.rb:204:inopen'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/machine.rb:204:in open' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/machine.rb:204:inid='
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/action/import.rb:15:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:incall'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/action/customize.rb:40:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:incall'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/action/check_accessible.rb:18:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:incall'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:95:in block in finalize_action' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:incall'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builder.rb:116:incall'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in block in run' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/util/busy.rb:19:inbusy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in run' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/call.rb:51:incall'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/config_validate.rb:25:incall'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builtin/call.rb:57:incall'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/providers/virtualbox/action/check_virtualbox.rb:17:incall'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builder.rb:116:incall'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in block in run' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/util/busy.rb:19:inbusy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in run' from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/machine.rb:147:inaction'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'

I tried,

  • CHMOD the entire vagrant-local dir to 777
  • 'sudo vagrant up'
  • completely uninstall everything and try again but using sudo
  • $ chmod -R 777 /opt/vagrant

I still get the same issue whatever I try. Any ideas why this might be and
how I can resolve?

Cheers


Reply to this email directly or view it on GitHubhttps://github.com/10up/varying-vagrant-vagrants/issues/261
.

-Doug

$ find /home/philipjohn/vagrant-local/.vagrant/machines/ -exec ls -al {} \;
total 12
drwxrwxr-x 3 philipjohn philipjohn 4096 Jan 18 20:29 .
drwxrwxr-x 3 philipjohn philipjohn 4096 Jan 18 20:29 ..
drwxrwxr-x 3 philipjohn philipjohn 4096 Jan 18 20:29 default
total 12
drwxrwxr-x 3 philipjohn philipjohn 4096 Jan 18 20:29 .
drwxrwxr-x 3 philipjohn philipjohn 4096 Jan 18 20:29 ..
drwxrwxrwx 2 philipjohn philipjohn 4096 Jan 18 20:33 virtualbox
total 32
drwxrwxrwx 2 philipjohn philipjohn 4096 Jan 18 20:33 .
drwxrwxr-x 3 philipjohn philipjohn 4096 Jan 18 20:29 ..
-rw-r--r-- 1 root       root         10 Jan 18 20:33 action_set_name
-rw-r--r-- 1 root       root         36 Jan 18 20:32 id
-rw-r--r-- 1 root root 36 Jan 18 20:32 /home/philipjohn/vagrant-local/.vagrant/machines/default/virtualbox/id
-rw-r--r-- 1 root root 10 Jan 18 20:33 /home/philipjohn/vagrant-local/.vagrant/machines/default/virtualbox/action_set_name

so I did this;

sudo chown philipjohn:philipjohn /home/philipjohn/vagrant-local/.vagrant/machines/default/virtualbox/id
sudo chown philipjohn:philipjohn /home/philipjohn/vagrant-local/.vagrant/machines/default/virtualbox/action_set_name

..and it works now, yay!

Thanks :+1:

Thanks! Spent 4 hours trying to figure this thing out, been chasing the wrong thread "why is vagrant asking for sudo?"

Wow, it worked. Nice!

Amazing! spent same 4 hours with the same question! Thank you!

Need help !!!!

Above solution didnt work for me

dynaguest@14 vfde-ose % find  /Users/dynaguest/Public/projects/vfde-ose/.vagrant/machines/ -exec ls -al {} \;
total 0
drwxr-xr-x  3 dynaguest  staff   96 Jul  3 19:20 .
drwxr-xr-x  4 root       staff  128 Jul  3 19:20 ..
drwxr-xr-x  3 dynaguest  staff   96 Jul  3 19:20 default
total 0
drwxr-xr-x   3 dynaguest  staff   96 Jul  3 19:20 .
drwxr-xr-x   3 dynaguest  staff   96 Jul  3 19:20 ..
drwxr-xr-x  11 dynaguest  staff  352 Jul  3 19:23 virtualbox
total 72
drwxr-xr-x  11 dynaguest  staff   352 Jul  3 19:23 .
drwxr-xr-x   3 dynaguest  staff    96 Jul  3 19:20 ..
-rw-r--r--   1 dynaguest  staff    40 Jul  3 19:23 action_provision
-rw-r--r--   1 dynaguest  staff    10 Jul  3 19:20 action_set_name
-rw-r--r--   1 dynaguest  staff   105 Oct 14 12:59 box_meta
-rw-r--r--   1 dynaguest  staff     1 Jul  3 19:20 creator_uid
-rw-r--r--   1 dynaguest  staff    36 Jul  3 19:20 id
-rw-r--r--   1 dynaguest  staff    32 Jul  3 19:20 index_uuid
-rw-------   1 dynaguest  staff  1675 Jul  3 19:21 private_key
-rw-r--r--   1 dynaguest  staff   882 Oct 14 12:59 synced_folders
-rw-r--r--   1 dynaguest  staff    41 Jul  3 19:20 vagrant_cwd
-rw-r--r--  1 dynaguest  staff  882 Oct 14 12:59 /Users/dynaguest/Public/projects/vfde-ose/.vagrant/machines//default/virtualbox/synced_folders
-rw-r--r--  1 dynaguest  staff  1 Jul  3 19:20 /Users/dynaguest/Public/projects/vfde-ose/.vagrant/machines//default/virtualbox/creator_uid
-rw-r--r--  1 dynaguest  staff  10 Jul  3 19:20 /Users/dynaguest/Public/projects/vfde-ose/.vagrant/machines//default/virtualbox/action_set_name
-rw-------  1 dynaguest  staff  1675 Jul  3 19:21 /Users/dynaguest/Public/projects/vfde-ose/.vagrant/machines//default/virtualbox/private_key
-rw-r--r--  1 dynaguest  staff  41 Jul  3 19:20 /Users/dynaguest/Public/projects/vfde-ose/.vagrant/machines//default/virtualbox/vagrant_cwd
-rw-r--r--  1 dynaguest  staff  105 Oct 14 12:59 /Users/dynaguest/Public/projects/vfde-ose/.vagrant/machines//default/virtualbox/box_meta
-rw-r--r--  1 dynaguest  staff  40 Jul  3 19:23 /Users/dynaguest/Public/projects/vfde-ose/.vagrant/machines//default/virtualbox/action_provision
-rw-r--r--  1 dynaguest  staff  36 Jul  3 19:20 /Users/dynaguest/Public/projects/vfde-ose/.vagrant/machines//default/virtualbox/id
-rw-r--r--  1 dynaguest  staff  32 Jul  3 19:20 /Users/dynaguest/Public/projects/vfde-ose/.vagrant/machines//default/virtualbox/index_uuid
dynaguest@14 vfde-ose % sudo chown dynaguest:staff  /Users/dynaguest/Public/projects/vfde-ose/.vagrant/machines/default/virtualbox/action_set_name
dynaguest@14 vfde-ose % sudo chown dynaguest:staff  /Users/dynaguest/Public/projects/vfde-ose/.vagrant/machines/default/virtualbox/id 

I am still getting this issue :

dynaguest@14 vfde-ose % vagrant up
The VirtualBox VM was created with a user that doesn't match the
current user running Vagrant. VirtualBox requires that the same user
be used to manage the VM that was created. Please re-run Vagrant with
that user. This is not a Vagrant issue.

The UID used to create the VM was: 0
Your UID is: 501

Do you have this issue with VVV?
We are talking of a ticket of 4 years ago so it is better to open a new one with updated info about versioning of the various tools

@Mte90 ok, I will open a new ticket 👍but what is VVV? I want to use 'vagrant' without 'sudo'.

VVV is this vagrant project for a wordpress dev environment, so if you have no idea of that probably you need to open the ticket to Vagrant itself.

thanks for the tip @Mte90

Also, avoid using sudo with vagrant, you're probably going to have to destroy and recreate your VM to get it working without sudo

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timichango picture timichango  ·  3Comments

rwrobe picture rwrobe  ·  4Comments

tomjn picture tomjn  ·  3Comments

dingo-d picture dingo-d  ·  3Comments

JDGrimes picture JDGrimes  ·  4Comments