Vvv: vagrant up fails `initialize': Permission denied

Created on 21 May 2014  Â·  29Comments  Â·  Source: Varying-Vagrant-Vagrants/VVV

I keep getting some sort of permission denied error, apparently related to Ruby:

==> default: Running cleanup tasks for 'shell' provisioner...
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/environment.rb:410:in `initialize': Permission denied - /Users/colin/.vagrant.d/data/lock.fpcollision.lock (Errno::EACCES)

It's completely torpedoed my efforts to get grunt running. I already tried

sudo chmod -R 755 /Applications/Vagrant

Made no difference...

Help!?

question

Most helpful comment

Had the same problem with the latest version of Vagrant:

opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:492:in `initialize': Permission denied - /Users/svenhaveman/.vagrant.d/data/lock.fpcollision.lock (Errno::EACCES)

I fixed this by changing the ownership of the file: chown svenhaveman:staff ~/.vagrant.d/data/lock.fpcollision.lock

Don't sudo anything, this will lead to other errors.

All 29 comments

I just reinstalled my entire operating system. Hopefully that'll fix it.

UPDATE: Upon further investigation my problems were not anything to do with VVV, it was Vagrant 1.6.x it's not really stable yet. It doesn't properly support vagrant-hostsupdater or any other plugin that relies on nokogiri.

For more:
https://github.com/cogitatio/vagrant-hostsupdater/issues/28
https://github.com/mitchellh/vagrant/issues/3769

Thanks for the notes @colinsteinmann! Vagrant 1.6.x has been a bit troublesome. I'm hoping that gets cleaned up shortly as there is some great stuff in it.

There is a good workaround mentioned by @fredngo in the https://github.com/mitchellh/vagrant/issues/3769 thread.

That said I'm sticking to 1.5.4 till this is sorted out proper.

Same problem in newest vagrant version 1.7.0 :-1:

I have the same issue, this did the trick for me:
sudo vagrant up

vagrant 1.7.2 - same issue

sudo chmod -R /home/_user_name_/.vagrant.d

it helps for me

Don't do the sudo trick on your Mac or Linux build. Something's permissions
are probably off. Do a find . -user root from inside your VVV dir and see
if anything is off.

On Wed, Jan 14, 2015 at 2:41 PM, Anton Iliyn [email protected]
wrote:

vagrant 1.7.2 - same issue

Reply to this email directly or view it on GitHub
https://github.com/Varying-Vagrant-Vagrants/VVV/issues/362#issuecomment-69977895
.

-Doug

Had the same problem with the latest version of Vagrant:

opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:492:in `initialize': Permission denied - /Users/svenhaveman/.vagrant.d/data/lock.fpcollision.lock (Errno::EACCES)

I fixed this by changing the ownership of the file: chown svenhaveman:staff ~/.vagrant.d/data/lock.fpcollision.lock

Don't sudo anything, this will lead to other errors.

@svenhaveman fix worked for me- and I was running into it while getting VIP Quickstart set up

Same problem and I've tried various different installs hoping one was more stable. I've tried @svenhaveman fix but no luck either :(

@svenhaveman works for me too. I've got problems with id_rsa and private_keys files. Vagrant 1.7.2

I am not really informed when it comes to the progress of the vagrant development but there was one change that gave me some problems.

"Normally" all vagrants were using the ssh keys from the $user/.vagrant folder.
Now the keys are generated per vagrant and saved in the .vagrant folder connected to the specific vagrant

This happened to me because I ran "vagrant up" with one user (user1 or root), then tried to run it with another (user2). When you attempt to vagrant up with user2, it can't access /Users/colin/.vagrant.d/data/lock.fpcollision.lock which is now owned by user1. It is maybe best to always run vagrant with the same user.

I always only use one user. I'm the only user on this computer.

On Thu, May 28, 2015 at 7:01 AM, Albert Albala [email protected]
wrote:

This happened to me because I ran "vagrant up" with one user (user1 or
root), then tried to run it with another (user2). When you attempt to
vagrant up with user2, it can't access
/Users/colin/.vagrant.d/data/lock.fpcollision.lock which is now owned by
user1. It is maybe best to always run vagrant with the same user.

—
Reply to this email directly or view it on GitHub
https://github.com/Varying-Vagrant-Vagrants/VVV/issues/362#issuecomment-106324924
.

@lizkaraffa probably 99% of us have the same configuration as you. Can you check what the owner and permissions are from the /Users/lizkaraffa/.vagrant.d/data/lock.fpcollision.lock file?

@svenhaveman here's a screenshot of my permissions. Please let me know if
there I'm missing something or didn't provide what you needed.

On Fri, May 29, 2015 at 12:30 AM, svenhaveman [email protected]
wrote:

@lizkaraffa https://github.com/lizkaraffa probably 99% of us have the
same configuration as you. Can you check what the owner and permissions are
from the /Users/lizkaraffa/.vagrant.d/data/lock.fpcollision.lock file?

—
Reply to this email directly or view it on GitHub
https://github.com/Varying-Vagrant-Vagrants/VVV/issues/362#issuecomment-106725105
.

I'm not seeing anything :). Can you upload the screenshot again?

@svenhaveman Sure here's a link to the screenshot: https://flic.kr/p/tYHfYf Let me know if I grabbed the right thing! :)

This should be fine. You could try chmod'ing it to 755, but i would guess it doesn't make a difference. Maybe you have an other problem.

Yeah I just resorted back to a much older version and it works for me.
Anything newer and I have to be in sudo mode all the time which I don't
want to do
On Jun 2, 2015 12:48 AM, "svenhaveman" [email protected] wrote:

This should be fine. You could try chmod'ing it to 755, but i would guess
it doesn't make a difference. Maybe you have an other problem.

—
Reply to this email directly or view it on GitHub
https://github.com/Varying-Vagrant-Vagrants/VVV/issues/362#issuecomment-107844886
.

I had the same problem on OSX Yosemite today. @svenhaveman's tip saved the day.

Windows 10, same problem, but there is no fpcollision file!

Thanks @svenhaveman - worked for me

In my case on Windows 10 i was looking in error that was in cmder. there was permission denied for C:/Users/Alex/.vagrant.d/tmp/hosts.local, i checked with ls -all C:/Users/Alex/.vagrant.d/tmp there was two files:
-r--r--r-- 1 Alex 0 3466 2017-01-06 10:59 hosts.local
-rw-rw-rw- 1 Alex 0 2220 2017-01-06 11:31 hosts.youwe-vm
i removed falg "Read Only" for hosts.local it solved my issue

I am facing the same problem trying to install vagrant the last few days, no luck

C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.5/lib/vagrant/machine_index.rb:321:in `initialize': Permission denied @ rb_sysopen - C:/Users/Noor/.vagrant.d/data/machine-index/index.lock (Errno::EACCES)

My Configuration :
Local Host: Windows 10 Machine
Guest Host: ubuntu/trusty64

Your support is appreciate it!

I had this issue by running sudo vagrant up on Mac and afterwards trying to run it without sudo (which, of course is the preferred way). Simply rm -rf .vagrant* did the trick for me without any negative consequences.

I had this issue by running sudo vagrant up on Mac and afterwards trying to run it without sudo (which, of course is the preferred way). Simply rm -rf .vagrant* did the trick for me without any negative consequences.

The solution posted by brianupload worked for me as well on Mac, Vagrant 2.6 and Virtual Box.

TLDR: Never use sudo with vagrant

Was this page helpful?
0 / 5 - 0 ratings