bosh-lite – Error 100: Permission denied @ dir_s_mkdir – /vagrant/tmp

Johannes Hiemer
27. April 2015
Reading time: 1 min

Sometimes when running a Cloudfoundry deployment with bosh-lite you might run into the following error:

Deploying
---------
Deployment name: `cf-manifest.yml'
Director name: `Bosh Lite Director'
Are you sure you want to deploy? (type 'yes' to continue): yes

Director task 7
  Started preparing deployment
  Started preparing deployment > Binding deployment. Done (00:00:00)
  Started preparing deployment > Binding releases. Done (00:00:00)
  Started preparing deployment > Binding existing deployment. Done (00:00:00)
  Started preparing deployment > Binding resource pools. Done (00:00:00)
  Started preparing deployment > Binding stemcells. Done (00:00:00)
  Started preparing deployment > Binding templates. Done (00:00:00)
  Started preparing deployment > Binding properties. Done (00:00:00)
  Started preparing deployment > Binding unallocated VMs. Done (00:00:00)
  Started preparing deployment > Binding instance networks. Done (00:00:00)
     Done preparing deployment (00:00:00)

  Started preparing package compilation > Finding packages to compile. Failed: Permission denied @ dir_s_mkdir - /vagrant/tmp (00:00:00)

The root cause of this error are misconfigured user rights in the Vagrant VMs (this is valid for VMware Fusion and VirtualBox as Vagrant providers) shared folder. You can easily fix that, by connecting into your bosh-lite VM and runnin:

vcap@agent-id-bosh-0:~$ sudo chown -cR vcap:vcap /vagrant/
changed ownership of ‚/vagrant‘ from root:root to vcap:vcap