Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vagrant up fails `initialize': Permission denied #362

Closed
metaColin opened this issue May 21, 2014 · 29 comments
Closed

vagrant up fails `initialize': Permission denied #362

metaColin opened this issue May 21, 2014 · 29 comments

Comments

@metaColin
Copy link

metaColin commented May 21, 2014

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!?

@metaColin metaColin changed the title vagrant up fails vagrant up fails `initialize': Permission denied May 21, 2014
@metaColin
Copy link
Author

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:
agiledivider/vagrant-hostsupdater#28
hashicorp/vagrant#3769

@jeremyfelt
Copy link
Member

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.

@metaColin
Copy link
Author

There is a good workaround mentioned by @fredngo in the hashicorp/vagrant#3769 thread.

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

@mangulski-neducatio
Copy link

Same problem in newest vagrant version 1.7.0 👎

@f0ns
Copy link

f0ns commented Jan 14, 2015

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

@brud
Copy link

brud commented Jan 14, 2015

vagrant 1.7.2 - same issue

@brud
Copy link

brud commented Jan 14, 2015

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

it helps for me

@zamoose
Copy link
Contributor

zamoose commented Jan 14, 2015

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
#362 (comment)
.

-Doug

@svenhaveman
Copy link

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.

@zachwills
Copy link

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

@lizkaraffa
Copy link

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

@keeprock
Copy link

keeprock commented May 4, 2015

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

@cfoellmann
Copy link
Member

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

@alberto56
Copy link

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.

@lizkaraffa
Copy link

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
#362 (comment)
.

@svenhaveman
Copy link

@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?

@lizkaraffa
Copy link

@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
#362 (comment)
.

@svenhaveman
Copy link

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

@lizkaraffa
Copy link

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

@svenhaveman
Copy link

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.

@lizkaraffa
Copy link

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
#362 (comment)
.

@danrcastro
Copy link

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

@AlesRFK
Copy link

AlesRFK commented Jan 18, 2016

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

@Committing
Copy link

Thanks @svenhaveman - worked for me

@ghost
Copy link

ghost commented Jan 6, 2017

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

@noorcoder
Copy link

noorcoder commented Jun 11, 2017

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!

@yourkin
Copy link

yourkin commented May 25, 2019

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.

@dallasclouddev
Copy link

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.

@tomjn
Copy link
Member

tomjn commented Dec 10, 2019

TLDR: Never use sudo with vagrant

@Varying-Vagrant-Vagrants Varying-Vagrant-Vagrants locked as resolved and limited conversation to collaborators Dec 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests