
On Fri, 2020-07-10 at 12:26 +0200, Jan Engelhardt wrote:
/tmp is one of the weirder places in a system.
It is nice that FHS says it is not persistent across reboots, but if you have a workstation or server which is "never" (or at least, seldomly) rebooted, the directory can still fill up - and take away RAM from both oneself and other users.
Firefox for example has the very bad habit of dumping all its .xpi file downloads into /tmp, and not cleaning them.
Users have bad habit :^) in abusing /tmp as the shortest way to store a file in a known location for some time - because any other location would be persistent (but /tmp might be too heh) and the path much longer.
The POSIX standard (aka IEEE P1003.2) makes it a hard requirement that any application should not assume that /tmp is persistant between *application executations* never mind between reboots. I do not think we should be catering for use cases that totally breach the oldest core tenants of how things should be done. /tmp shouldn't be persistant, keeping the contents around in memory until the next reboot is still generous. At some point we should reserve the right to just say 'no' to horrifically bad practice. I feel this is one of those cases, especially as even conserative platforms like Debian made this jump years ago.
Another thought that crossed my mind is making systemd set up a PrivateTmp for login sessions, i.e. make /tmp a bind mount to the users home dir, so it does actually account towards their disk quota.
Applications that want to use the users home directory can use $XDG_CACHE_HOME, like firefox does when delivered by flatpak for example. That would be more sensible than potentially relocating tmp files intended for the system scope to a users home directory. -- Richard Brown Linux Distribution Engineer - Future Technology Team Phone +4991174053-361 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, D-90409 Nuernberg (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org