The traditional name of directories (especially on Unix and Unix-like operating systems) used to store temporary files. Also, the filename extension of temporary files.
Questions tagged [tmp]
280 questions
55
votes
3 answers
php:: how long to tmp files stay?
I am working on an upload script.
If a user uploads a file and it already exists I want to warn the user (this is all through ajax) and give them the option to replace it, or cancel.
Instead of moving the file,
I was curious if I could just leave…
![](../../users/profiles/383759.webp)
Hailwood
- 79,753
- 103
- 257
- 412
37
votes
4 answers
Can't write to /tmp with php, despite 777 permissions and no open_basedir value
I'm trying to write a file to my /tmp directory (on an apache server) with the php fopen function, but it fails:
![](../../users/profiles/344871.webp)
Anders Sundnes Løvlie
- 776
- 2
- 7
- 11
34
votes
6 answers
Changing the tmp folder of mysql
Our Mysql queries use temporary tables which creates temporary files in the process. Currently the files are written to /tmp. How exactly can the path of the temp folder to which mysql writes to be changed?
![](../../users/profiles/626773.webp)
Maxim Dsouza
- 1,457
- 3
- 17
- 31
31
votes
6 answers
What happened to the TMP environment variable?
I always heard that the proper way to find the temporary folder on a UNIX machine was to look at the TMP environment variable. When writing code that worked on Windows as well as Linux, I would check for TEMP and TMP.
Today, I discovered that my…
![](../../users/profiles/147562.webp)
boatcoder
- 15,651
- 16
- 95
- 164
27
votes
2 answers
How do I clear my Rails file cache?
I’m running Rails 4.2.7 on Ubuntu 14.04. I have written the following method to help cache some data (preventing hits against my PostGres 9.5 database) …
class Country < ActiveRecord::Base
has_many :states
def self.cached_find_by_iso(iso)
…
![](../../users/profiles/1235929.webp)
Dave
- 17,420
- 96
- 300
- 582
24
votes
3 answers
Php has its own /tmp in /tmp/systemd-private-nABCDE/tmp when accessed through nginx
I found strange behaviour concerning php and /tmp folder. Php uses another folder when it works with /tmp. Php 5.6.7, nginx, php-fpm.
I execute the same script in two ways: via browser and via shell. But when it is launched via browser, file is not…
![](../../users/profiles/1749836.webp)
shukshin.ivan
- 10,058
- 3
- 42
- 63
22
votes
4 answers
How can I save an image to my app's tmp dir?
Why is that if I use NSTemporaryDirectory to save my image, the image is saved into
/var/folders/oG/oGrLHcAUEQubd3CBTs-1zU+++TI/-Tmp-/
and not into
/Users/MyMac/Library/Application Support/iPhone…
![](../../users/profiles/929339.webp)
vosy
- 231
- 1
- 3
- 7
16
votes
1 answer
Store file in directory tmp on heroku Rails
In my Delayed Job, I tried to create a file to tmp folder
file_path = Rails.root.join('tmp', "#{file_name}." + file_extension);
exported_file = kit.to_pdf
# Save file to disk
File.open(file_path, 'wb') do |file|
file << exported_file
end
It…
![](../../users/profiles/2540616.webp)
ZeroX
- 185
- 1
- 2
- 7
15
votes
5 answers
Unable to create tempDir, java.io.tmpdir is set to C:\Windows\
I'm using Spring Boot with embedded tomcat, everything worked fine and suddenly I got the error :
Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to create tempDir. java.io.tmpdir is set to C:\Windows\
…
![](../../users/profiles/5979816.webp)
ilya
- 172
- 1
- 2
- 9
15
votes
1 answer
Write to /tmp directory in aws lambda with python
Goal
I'm trying to write a zip file to the /tmp folder in a python aws lambda, so I can extract manipulate before zipping, and placing it in s3 bucket.
Problem
Os Errno30 Read Only FileSystem
This code was tested locally on my computer to make sure…
![](../../users/profiles/6257547.webp)
Codyj110
- 398
- 1
- 3
- 12
14
votes
3 answers
Ruby: Could not find a temporary directory
I am getting some 500 errors in my Passenger Rails app. When looking at the log it appears passenger cannot access the /tmp dir. I have validated that it is there and has RW access to root, and then tried www-data. What is going on here?
…
![](../../users/profiles/1050054.webp)
Clayton Selby
- 1,173
- 1
- 10
- 24
14
votes
2 answers
Heroku - how to write into "tmp" directory?
I need to use the tmp folder on Heroku (Cedar) for writing some temporarily data, I am trying to do that this way:
open("#{Rails.root}/tmp/#{result['filename']}", 'wb') do |file|
file.write open(image_url).read
end
But this produce error…
![](../../users/profiles/984621.webp)
user984621
- 41,002
- 66
- 200
- 371
12
votes
3 answers
Why are RackMultipart* files persisting in my Rails /tmp directory?
I'm using Paperclip (2.3) to handle image uploads on a Rails 3.0.3 app running on Ubuntu. Paperclip is handling the uploads as advertised BUT the RackMultipart* files that are created in the application's /tmp folder persist -- that is, they simply…
![](../../users/profiles/562028.webp)
NAD
- 605
- 7
- 18
12
votes
1 answer
Tomcat Server creating Directories in tmp
Everytime my embedded virtual tomcat server is ran (spring boot) it creates a directory structure in /tmp/ that is named tomcat.##########################.8080 (I am guessing 8080 is for port or something but the 8080 is consistent). This structure…
![](../../users/profiles/3684399.webp)
user3684399
- 145
- 2
- 9
12
votes
1 answer
boost::spirit composing grammars from grammars
I have figured out how to use spirit -- i.e., I have written a moderately complex grammar. I always take the approach of growing a program -- one subsystem at a time. I've written the data structures for a complex model which has 4 types at the…
![](../../users/profiles/153865.webp)
Hassan Syed
- 19,054
- 9
- 76
- 156