Questions tagged [tmp]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
29 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 (...
ChennyStar's user avatar
  • 1,643
0 votes
0 answers
21 views

/tmp and /var/tmp as tmpfs and volatility [duplicate]

The use of separate file systems for different paths can protect the system from failures resulting from a file system becoming full or failing. Check that a file system/partition has been created for ...
ron's user avatar
  • 6,515
0 votes
0 answers
19 views

Issue with open syscall in /tmp folder with uid 0 [duplicate]

I have conducted a small test which raised an issue i could not figure out. Create file in /tmp named what as shell user (uid 1000), then make it 0666 (rw-rw-rw-) Try to call open with uid 0 (root) ...
TOK's user avatar
  • 1
0 votes
0 answers
35 views

Can fstab interfere with MTP mounting?

At some point a few months ago I added a line to the fstab to make the tmp go into ram instead of onto the disk: tmpfs /tmp tmpfs defaults,noatime,nosuid,nodev,mode=1777,size=10240M 0 0 That came ...
cardamom's user avatar
  • 550
0 votes
1 answer
64 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 ...
LaVache's user avatar
  • 383
4 votes
1 answer
780 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 ...
sdaau's user avatar
  • 6,778
0 votes
1 answer
339 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 ...
LeoDog896's user avatar
  • 149
0 votes
1 answer
224 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 ...
Jaay's user avatar
  • 145
1 vote
1 answer
521 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 ...
xeruf's user avatar
  • 541
0 votes
1 answer
219 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?
George M.'s user avatar
2 votes
2 answers
5k 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 ...
Alexey's user avatar
  • 1,988
1 vote
1 answer
307 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 ...
an.ordinary.user's user avatar
0 votes
1 answer
110 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 ...
SHawarden's user avatar
  • 554
23 votes
4 answers
2k 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 ...
Artur Klemens's user avatar
1 vote
1 answer
510 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/...
linux user's user avatar
3 votes
2 answers
1k 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 /...
TSG's user avatar
  • 1,688
0 votes
0 answers
137 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 ...
MX-User's user avatar
1 vote
0 answers
1k 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-...
VictorLee's user avatar
  • 125
3 votes
0 answers
5k 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 ...
Jonas Stein's user avatar
  • 4,078
2 votes
1 answer
231 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 ...
T_R_O_N's user avatar
  • 23
4 votes
2 answers
543 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 ...
hanno's user avatar
  • 131
2 votes
1 answer
24k 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 /...
vcth4nh's user avatar
  • 183
2 votes
1 answer
942 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 ...
JayRugMan's user avatar
  • 116
3 votes
1 answer
1k 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?
pietro_molina's user avatar
1 vote
0 answers
591 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 ...
Nasrat Salehi's user avatar
0 votes
3 answers
1k 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 /...
Vlastimil Burián's user avatar
0 votes
1 answer
3k 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? ...
Kai Mo's user avatar
  • 1
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 # ^ ...
Anon's user avatar
  • 215
0 votes
0 answers
407 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 ...
Krupip's user avatar
  • 131
1 vote
1 answer
302 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,...
Vinícius Gonçalves de Oliveira's user avatar
0 votes
0 answers
141 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 ...
thatbangaloreanguy's user avatar
5 votes
2 answers
3k 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 -...
Thiago Barcala's user avatar
1 vote
1 answer
450 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 ...
Porcupine's user avatar
  • 1,844
1 vote
1 answer
226 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 ...
puwlah's user avatar
  • 519
2 votes
1 answer
5k 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 ...
Ned64's user avatar
  • 8,696
0 votes
2 answers
2k 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 ...
raylight's user avatar
  • 421
0 votes
0 answers
37 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 ...
Ole Tange's user avatar
  • 35.4k
1 vote
1 answer
973 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-...
stackprotector's user avatar
1 vote
1 answer
316 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 ...
ceremcem's user avatar
  • 2,341
4 votes
0 answers
512 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 ...
cas's user avatar
  • 78.3k
2 votes
2 answers
3k 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?
Nordine Lotfi's user avatar
5 votes
4 answers
3k 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 ...
leftaroundabout's user avatar
1 vote
1 answer
236 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 ...
George's user avatar
  • 11
3 votes
1 answer
5k 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 ...
Clément Moissard's user avatar
1 vote
1 answer
1k 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 ...
user14492's user avatar
  • 843
2 votes
0 answers
339 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 ...
Curious's user avatar
  • 21
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 # .....
user2740's user avatar
  • 291
1 vote
0 answers
582 views

/tmp messed up, even ls /tmp fails

We are seeing a small cluster become unusable. Initially the same behavior was on a compute node, it is now occuring on the head node. I do not know if this is the underlying source, but for certain ...
Laurence D Marks's user avatar
1 vote
2 answers
860 views

Should programs remove temporary files in /tmp?

I have a program which uses temporary files, created using the mkstemps function. The files are created inside the /tmp directory. Does these files get removed automatically on program exit? I'm ...
wefwefa3's user avatar
  • 1,385
0 votes
1 answer
92 views

location for multi-user script temp file

On our unix webhost, I created a set of scripts for automating the website deploy process. Since I was the only user, I had the scripts keeping track of what phase of the deploy it was in by changing ...
user394's user avatar
  • 14.4k