There would traditionally been another TOCTOU is the described solution, namely hardlinks. This can often be used to get root to do something to a file it shouldn't.<p>The trad solution is to have user writeable areas (home, vartmp, tmp) on different volumes. Some tools have options to not traverse symlinks across volumes for this and other reasons. But on modern systems you are protected by the fs.protected_hardlinks setting.<p><a href="https://wiki.alpinelinux.org/wiki/Sysctl.conf" rel="nofollow noreferrer">https://wiki.alpinelinux.org/wiki/Sysctl.conf</a>