> We have two separate issues here: > a/ /tmp-on-tmpfs > b/ time based clean-up of /tmp and /var/tmp
> I think it makes sense to discuss/handle those separately. Agreed. I also don't see any issue with a/, at worst people will be annoyed with it for some reason and can then change it back. > Regarding b/: ... > The tmpfiles rule tmp.conf as shipped by systemd upstream ... > Files that are older then 10 days or 30 days are automatically cleaned up. This seems like a rather dangerous thing to spring on people. First of all, time can be pretty fluid on user machines. Someone has a laptop, they do some work and generate big files in /var/tmp/, maybe they're editing videos or processing medical images or downloading and pre-processing large datasets for machine learning. Now they close their laptop and go on vacation for six weeks. When they come back they open it and ... shazam all the files they were working on are deleted. Another scenario. I download a big source tarball, firefox say. I want to make a few small changes and compile a custom version. I keep it in /var/tmp/ for obvious reasons. (The patches are stored elsewhere of course.) Now I download a new patch and apply it and recompile. And get an error, because *some* of the files in the unpacked tree were too old and got auto-deleted. Imagine suspending a computer in the middle of a big build, and when I un-suspend it a few weeks later the build fails because some files are now too old and get deleted. Is this really desirable? To me, the purpose of /var/tmp/ when I have my "user" hat on is: a place to put files I don't want backed up, particularly large ones, and which if I run out of disk space is a place to look for stuff to delete. it's not "a place to put files that the system might capriciously delete just because." I do understand the imperative to keep the filesystem clean and to do routine maintenance and upkeep without user intervention. But changing something that used to be "stable storage unless your disk crashes" into "files placed here can mysteriously disappear" seems like a major potentially-breaking change that can disrupt common work flows. I can see popping up a warning: "disk space on the filesystem containing /var/tmp is getting low and /var/tmp contains xxxGb of files, hit OKAY to delete the xxxGb of oldest files there" or something like that. But doing it silently is scary. One compromise would be to enable the /var/tmp/ reaper by default only on new installations. People can always turn it on if they want. Also, when files are deleted, I think the user should get warnings all over their desktop. I'd also suggest that the reaper by default never delete files from /var/tmp if there is a lot of space available, or if /var/tmp isn't consuming much space. --Barak Pearlmutter