3 ms·
Users can typically create any filename they like in /tmp, which causes trouble when the nightly cleanup script runs and tries to delete the old ones.
by tedunangst 2y ago
Users can typically create any filename they like in /tmp, which causes trouble when the nightly cleanup script runs and tries to delete the old ones.
- mozman 2y agofind -print0 | xargs -0
- chipdart 2y ago> Users can typically create any filename they like in /tmp, which causes trouble when the nightly cleanup script runs and tries to delete the old ones. I don't think that's how /tmp works. Aren't those files garbage collected either at boot time or after X days of creation? I mean, if your program creates a file in /tmp and keeps it open for days then you clearly screwed up as you're misusing the whole concept of a temporary file. For that there are better places in the file system hierarchy.
- pastage 2y agoIt all depends, next Debian will mount tmp in ram, LWN has a great article about it as usual. They talk about the problem with clean up, e.g. tmux sessions are stored in tmp. https://lwn.net/Articles/975565/ https://lwn.net/Articles/975565/
- chipdart 2y agoI don't think your reply holds any relevance. All it discusses is the file system used by a distro for it's /tmp. That's irrelevant for this discussion. The file system is still wiped on reboot and old files are garbage collected after X days of creation, which is handed by the likes of systemd and upstart. The article you quoted reiterates exactly the points I made.