mitchellh/vagrant — pull request #2290 by ianheggie (2013-09-29 11:19:56+00:00)
Title: Fix salt provision permissions error

`vagrant provision` fails if a temp file left by initial `vagrant up` is not removed, for example:

```
$ time vagrant provision
[default] Rsyncing folder: /home/ianh/Projects/Artabase/website/tmp/salt/ => /srv/salt...
[default] Rsyncing folder: /home/ianh/Projects/Artabase/website/tmp/pillar/ => /srv/pillar...
[default] Running provisioner: salt...
Copying salt minion config to vm.
Checking if salt-minion is installed
salt-minion found
Checking if salt-call is installed
salt-call found
Using Bootstrap Options: -c /tmp -C
Salt binaries found. Configuring only.
Failed to upload a file to the guest VM via SCP due to a permissions
error. This is normally because the user running Vagrant doesn't have
read permission on the file. Please set proper permissions on the file:

/opt/vagrant/embedded/gems/gems/vagrant-1.3.1/plugins/provisioners/salt/bootstrap-salt.sh

real	0m36.001s
user	0m1.188s
sys	0m0.088s
```

This fix removes the old /tmp/bootstrap_salt.sh before the normal upload of a fresh copy occurs. It is interesting that `vagrant up` leaves it owned by root, but `vagrant provision` leaves it owned by vagrant.