Re: Writing to files in /tmp
Reply #3 –
I think this is probably something I changed myself at some point for some reason but forgot about - then the filesystem update put it back to standard. I think the strange behaviour is perhaps due to the nosuid mount option:
tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0
but I don't get this with other ways of writing to a file:
/tmp$ echo hi>>somefile
/tmp$ sudo echo hi>>somefile
/tmp$ ls -l somefile
-rw-r--r-- 1 me me 6 Sep 18 06:03 somefile
/tmp$ cat somefile
hi
hi
And copying the C test binary to be a root owned one in /usr/local/bin still fails to fopen the user owned file as root.