I am trying to open a temporary file using
fd = open("/tmp", O_RDWR | O_TMPFILE, 0);
if (fd == -1) {
perror("open()");
exit(1);
}
and I get "open (): Permission denied".
I have permissions in / tmp:
drwxrwxrwt 13 root root 1.2K Apr 23 13:55 /tmp/
and I believe that my kernel is fairly new to O_TMPFILE:
Linux frosties 3.14-1-amd64
What am I missing?
source
share