-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 temp files being saved to code directory instead of ~/.vagrant.d/tmp #3493
Comments
I've heard of this happening before, and there have been a couple other issues, but I've never actually been able to figure this out. I just committed some stuff to better clean up temporary files. In the mean time, here is how Ruby figures out the temporary dir: https://github.com/ruby/ruby/blob/2254fc650b681c2582f25aa0d2be2cc8aba3cb8e/lib/tmpdir.rb#L25 |
A quick ruby program confirmed that my tmpdir is set to pwd.
I think the problem has to do with /tmp being world writable thus failing tmpdir()'s check. I changed TMPDIR, TMP and TEMP to ~/tmp under my home directory and everything loads to ~/tmp instead of pwd. Thanks for the insight. |
So "/tmp" directory is by default with "sticky" flag, I run chmod 777 and break that and having the same problem. To make your "/tmp" sticky you need to run: |
@stumbata suggestion has worked for me! Just run |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I'm using Vagrant 1.5.3 on CentOS 6.5. When I run vagrant up, vagrant provision, etc, temp files end up saved in my code's directory.
Below is a small snippet of the ls of my code's directory.
Setting VAGRANT_HOME or TMPDIR does not help the location of the cache files. I was expecting (based on the documentation) that the files be saved to ~/.vagrant.d/tmp or /tmp. I uninstalled Vagrant, deleted ~/.vagrant.d/ and reinstalled to make sure their were no weird permissions issues on my VAGRANT_HOME.
I've set VAGRANT_LOG to debug and checked for any of the filenames or portions of the filename but they are never recorded in the debug output.
Any ideas on which setting I could set or what is going on? Having vagrant* files litter my code directory seems like odd behavior.
The text was updated successfully, but these errors were encountered: