Questions tagged [tmp]
The tmp tag has no summary.
174 questions
1
vote
2
answers
178
views
No space left on device while building Python-3.13.3
Am installing Python-3.13.3 on an Ubuntu 22.04 LTS system.
make reported
../../../src/Python/python-3.13.3/Parser/parser.c:42298:1:
fatal error: error writing to /tmp/ccC4u7pE.s:
No space left ...
1
vote
2
answers
153
views
How can I store some 6 Gb of files in a temp directory that will be automatically deleted within one day and not require a reboot
I would like to store some files in a temp directory that will be automatically deleted within one day and not require a reboot.
The files will be about 6 Gigabytes.
When should I use /tmp?
Use /...
3
votes
0
answers
124
views
Slow Linux file access to /tmp
time touch /tmp/test.dat
real 0m1.03s
user 0m0.00s
sys 0m1.02s
A full second of sys-mode time to create a file in /tmp. That can become unbearable for ksh scripts that open dozens of files ...
1
vote
0
answers
190
views
Documentation for /tmp's default permissions
Is there any documentation for the default permissions of the /tmp folder on *nix, in particular Linux?
(Or perhaps /tmp doesn't have specified default permissions?)
Background:
I'm trying to ensure ...
7
votes
4
answers
2k
views
Ways to keep files in /tmp?
I have a RHEL 8 workstation that hosts an app whose GUI is accessible through https on an unprivileged port.
When the app is started, it creates a few socket files in /tmp with random names and the ....
0
votes
1
answer
82
views
tmpreaper error: run time exceeded
How to overcome/force-fix the following problem:
$ sudo /usr/sbin/tmpreaper 15d /tmp
error: run time exceeded!
This may be indicative of an attack to use tmpreaper to remove critical files;
or the ...
0
votes
1
answer
128
views
Do applications have priority over tmpfs for RAM usage (in the presence of swap)?
TLDR; If /tmp in mounted as tmpfs, in the presence of swap, is there any kind of priority when swapping ? Does tmpfs start to swap before applications ?
FULL STORY
I have a laptop with 32G of RAM (...
0
votes
1
answer
250
views
Only since Debian 11: regular users can't write to world/group writable files under /tmp/ owned by other users, unless owner is root [duplicate]
Users:
root
userA - the normal owner of the file
userB - the user that wants to write to the file
The file:
Let's say I have a basic text file: /tmp/file
Ownership: chown userA:groupA /tmp/file
...
4
votes
1
answer
2k
views
Change /tmp (to increase available space) on live system?
I use Ubuntu 20.04, on a machine that has a limited system drive.
I came across a build script that checks for available size in /tmp, and it refuses to run if it doesn't see 12 GB available, which I ...
0
votes
1
answer
2k
views
What does Linux do when the /tmp directory is flooded?
From my knowledge of the `/tmp` directory, it is cleared on reboot.
I'm unsure what happens to the living host whenever the /tmp folder is flooded (put to the max storage capacity) - does Linux have ...
0
votes
1
answer
410
views
Shred files in tmpfiles.d
After searching the tmpfiles.d, its seems like there is a limited number of option to erase the files/directories.
I want to totally erase the temporary directories with a shred like command, is there ...
1
vote
1
answer
1k
views
Unable to delete root-owned file under /tmp
The file and folder are owned by root but I did sudo chmod ugo+rw on both, which I confirmed with ls -l.
Still, I cannot remove the file as normal user.
❯ ls -ld /tmp /tmp/perm
drwxrwxrwt 46 root root ...
0
votes
1
answer
470
views
How to set up /var/tmp
This is a very stupid question but how can we set up /var/tmp? Is there a special way to do it or will just creating the directory suffice?
5
votes
2
answers
13k
views
tmp on tmpfs: fstab vs tmp.mount with systemd
To have /tmp on tmpfs, I know I can use an entry in /etc/fstab, but I do not understand the role of /etc/default/tmpfs mentioned sometimes, and in what case I need to create or modify it.
Recently, I ...
1
vote
1
answer
451
views
Processes in tmp folder
I have an application that has a process on the /tmp folder, and the process creates another file or folder. If the original process gets ended by the application, will all the files created by it get ...
0
votes
1
answer
339
views
Fix Polyinstantiation of /tmp causing 'connect /tmp/.X11-unix/X0: No such file or directory'
In a multiseat desktop system with the /tmp directory polyinstantiated, the /tmp/.X11-unix/ directory and Xn instances are still created under root's /tmp not a user's.
ssh -Ying into or out of the ...
23
votes
4
answers
3k
views
How can I copy a /tmp/ directory that is created & deleted by a process?
I am investigating the behavior of a binary on Oracle Linux 9 (XFS filesystem). This binary, when called by a process, creates a directory under /tmp and copies some files to it. This directory gets a ...
1
vote
1
answer
988
views
Can't mount zram device on /tmp (Booting problem)
I have a simple script that creates a zram device and formats it to ext4 and finally, it mounts zram on /tmp.
#!/bin/bash
# create zram with size 1.5G
# $zram_dev is created device path (eg. /dev/...
4
votes
2
answers
3k
views
Is /var/spool automatically removed/cleaned
My app is keeping files in /var/spool/myapp and that works fine. If my app crashes, then it might leave files in that directory.
Over time, this can add up to a lot of files, so I wondered if the /...
0
votes
0
answers
186
views
MX-21 /tmp directory empty on reboot
I am using MX-21 and my /tmp directory is getting purged on every reboot. I would like to keep my /tmp for a week, so after some searching the web I modified the /etc/tmpfiles.d/tmp.conf file and ...
1
vote
0
answers
2k
views
what's root cause of "A start job is running for Create Volatile Files and Directories"
Stuck at "A start job is running for Create Volatile Files and Directories" after reboot a server(Debian 9.5, 64bit), and solve by this "boot-stuck-at-a-start-job-is-running-for-create-...
3
votes
0
answers
7k
views
When to clean up /var/tmp?
/var/tmp is not defined in POSIX, but is defined in FHS:
5.15. /var/tmp : Temporary files preserved between system reboots
5.15.1. Purpose
The /var/tmp directory is made available for programs that
...
2
votes
1
answer
382
views
Why is Supervisord configured to exec/run in the tmp folder by default?
I've got a question regarding supervisord. After running echo_supervisord_conf, I noticed that the directory it runs in is configured as /tmp by default. Why is this the case? Is it because the /tmp ...
4
votes
2
answers
711
views
Should TMPDIR have a trailing slash?
In Unix/POSIX/Linux systems it's possible to set the temporary directory via the TMPDIR variable. Wikipedia references a specification by the Open Group mentioning this.
What this doesn't answer for ...
4
votes
1
answer
37k
views
Permission denied in /tmp
/tmp folder has all permission:
drwxrwxrwt 28 root root 20480 Jan 24 03:14 /tmp
File /tmp/test.txt already exists, with permission 666, owned by user test1.
-rw-rw-rw- 1 test1 test1 0 Jan 24 02:34 /...
2
votes
1
answer
1k
views
How is /tmp linked to /var/tmp
I've already read up on the differences between /tmp and /var/tmp, so note that this is not what this question is about. When I create a file in /tmp, it shows up in /var/tmp; however, neither ...
3
votes
1
answer
2k
views
Where can users create temporary files safely?
Once /tmp ideally should be reserved for the system, where can a user create temporary files safely?
1
vote
0
answers
959
views
How to tar-gzip a directory and put it in the /tmp
Hey im stuck on a assignment and i dont know how to solve it really because iam quite new with working in linux. I have to place a directory in a tar-ball and zip it using gzip.
At the moment this is ...
0
votes
3
answers
3k
views
Can I safely detete the contents of /var/tmp (flatpak items)?
Today I'm trying to save some valuable space on my system disk and I might have a real newbie question: Can I safely detete the contents of /var/tmp (flatpak items)?
$ sudo du -sh /var/tmp
1.5G /...
0
votes
2
answers
5k
views
How can I increase the size of /tmp directory without affecting RAM or anything else? (Redhat 8.2)
I'm new at Linux and I will get use of your help guys on this..
I want to increase the size of /tmp directory without affecting RAM or anything else on Red Hat 8.2 .. any suggestions to do that?
...
0
votes
1
answer
1k
views
On xfs, why can't I hardlink to /tmp/, giving the error "Invalid cross-device link" when my fstab indicates tmp is on the same partition?
My error:
ln "99700.fa821246f01ef7f3d86a503e33de5753b50640d69de790fd3db5a5dc31ffa45d1dc64a93f950379ee432aa27cbb0593e6e50ddbb6f8a7e279afaf90cec961233.png" /home/anon/foo.png
# ^ ...
0
votes
0
answers
651
views
Centos, How to delete files with full root (but not full file system), with out repartitioning
Nvidia has screwed me and kept every single old version of CUDA since cuda 10 including every minor version inside of root totaling up to nearly 30 gigabytes of my 50 gigabyte root partition, and upon ...
1
vote
1
answer
398
views
Delete /tmp subvolume on btrfs partition scheme and make systemd-tmpfiles work with default tmpfs /tmp directory
I've made the mistake of mounting the /tmp directory as a btrfs subvolume. The problem is that systemd-tmpfiles won't clean it. How can I delete the /tmp subvolume and fix this? I'm new to filesystems,...
0
votes
0
answers
183
views
Browser downloads fail - Insufficient space in /tmp
I have a virtual machine (CentOS) that was pre-configured (I didn't partition them) and I have some of my work on it.
When I got access to the VM, it had very less storage space, and it isn't ...
5
votes
2
answers
5k
views
curl not able to write to /tmp directory owned by user
I tried running the script as instructed in https://docs.docker.com/engine/security/rootless/:
$ curl -fsSL https://get.docker.com/rootless | sh
But the script crashed in the following line:
curl -L -...
1
vote
1
answer
873
views
mktemp creates file in pwd rather than in /tmp
Previously mktemp used to create files in /tmp. Today I noticed that mktemp is creating file in $PWD rather than in /tmp?
Did I change something inadvertently? Any suggestions to fix this?
Note:
I ...
1
vote
1
answer
438
views
finding which files were removed from /tmp upon reboot
Hoping against hope here, but is there some in-built logging mechanism through which I can find out which files were deleted from /tmp upon reboot? I could obviously tweak the shutdown scripts, but ...
6
votes
1
answer
9k
views
How to disable/override automatic mounting of tmpfs to /tmp by systemd?
Background: On my system /tmp is a regular part of the / partition and I use it for a few important features of the system.
Current systemd Approach: On new systems systemd has started to take over ...
1
vote
2
answers
3k
views
Is it possible to create a temporary file that will autodelete after a specific time that it's not read by any other program?
I'd like to create a temporary file that will be read by multiple scripts after its creation, but I don't have an easy way of monitoring when the last script finishes reading this temporary file to ...
0
votes
0
answers
41
views
Root cannot append to file in /tmp [duplicate]
As root run:
cd /tmp
seq 10 > foo
chmod 666 foo
seq 10 >> foo
chown daemon foo
seq 10 >> foo
This gives:
-bash: foo: Permission denied
It is clear that it is due to /tmp's special ...
2
votes
1
answer
1k
views
From where does the service ID come from when using PrivateTmp=true in services?
Configuring a systemd service with PrivateTmp=true leads to the fact that the service uses a private tmp directory. Instead of /tmp such a service will use a directory like that:
/tmp/systemd-private-...
1
vote
1
answer
419
views
Is it possible to avoid trashing hard disk while using /tmp as a RAM device?
Origin
I need to implement some features to my GDB helper scripts but I have to stick with an older version of GDB (5.3, in this case). Since older versions lack so many features, I need to workaround ...
5
votes
0
answers
649
views
decluttering systemd-private clutter?
Is there any way to configure systemd so that it creates its private tmp directories (for unit files with PrivateTmp=true) in subdirectories under /tmp and /var/tmp instead of the top-level of those ...
2
votes
2
answers
4k
views
Why is using /tmp/ more popular and recommended than using /dev/shm?
From my own experience, i noticed that most people use /tmp/ for temp files or to save on disk write, but i don't often see anyone recommending or even using /dev/shm instead.
Why is that?
7
votes
5
answers
5k
views
Is it possible to boot in a way that doesn't delete /tmp?
Say I'm running some lengthy process, consisting of two steps: a generates a big intermediate file, say /tmp/aoutput, then b reads that file and does something further with it.
Now the system crashed ...
1
vote
1
answer
394
views
Do Unix/Linux systems generally have a "dump" directory?
A "middle" dump directory (path Y) to which one can to cut/copy-paste a few files from path X and then later cut/copy-paste these into path Z could be handy if someone is say upgrading a ...
3
votes
1
answer
6k
views
/tmp full but... empty
In a Python program, I use np.memmaps, which make use of the /tmp directory to handle massive arrays.
I make sure to clear /tmpregularly by running rm -rf /tmp/* every time I use this code. However ...
1
vote
1
answer
2k
views
Create a persistent temp directory with temporary content
I wish to create a directory in $TMP_DIR or /tmp/ which persists forever (i.e. is never deleted) but it is maintained by OS, i.e. the content of which can be deleted if they have not been opened/used ...
2
votes
0
answers
394
views
Slow boot process while ubuntu starts because of systemd temporary file creation
I run ubuntu 16.04 on a Dell laptop; I just love the fact that you can set the workspace to a grid format in 16.04, unlike say 18.04 where it looks like a line, but not sure if 20 does have the grid ...
1
vote
0
answers
1k
views
sudo crontab won't work without /tmp dir: "(CRON) error (create tmpfile)"
My system regularly moves /tmp to /snapshot. (background)
Now I want to create a cronjob that checks every minute if the directory was renamed by the system, and renames it back.
$ sudo crontab -l
# .....