herokuvagrantvirtualbox.netrc

Can't run Heroku from Virtualbox shared folder (wrong permission)


I can't run Heroku from Virtualbox home shared folder and receive permission error every time:

vagrant@precise32:~/projects/mysite$ heroku login Permission bits for '/home/user/.netrc' should be 0600, but are 777. You should run chmod 0600 /home/user/.netrc so that your credentials are NOT accessible by others.

I believe the problem is about the shared folder permissions as chmod command has no effect on the file.

Should I change permission from my windows host machine? And how should I do it right way?

Thanks for your assistance


Solution

  • The following line in vagrantfile solved the problem:

    config.vm.synced_folder "user", "/home/user/", :mount_options => ["dmode=755","fmode=600"]
    

    Shource