OSX: /tmp Not Writable : Operation not permitted My /tmp directory became unwritable yesterday, I believe that the permissions are all set correctly:

$ ls -l / 
lrwxr-xr-x@  1 root  wheel   11 Sep 22 16:05 tmp -&gt; private/tmp
$ ls -l /private
drwxrwxrwt@  3 root  wheel   102 Oct 17 15:04 tmp

$ ls -leO@d /private/tmp
drwxrwxrwt@ 3 root  wheel  restricted 102 Oct 17 15:04 /private/tmp
com.apple.rootless    0


However, I get an error when I attempt to write into this directory, even with sudo:

$ cd /tmp
$ pwd
/tmp
$ sudo cat &gt; test
-bash: test: Operation not permitted


I'm using OS X El Capitan 10.11.6. Any help is much appreciated- thanks!

Edit: after following fd0's suggestion, it looks like the directory might be rootless, which I suppose is related to SIP and may be why root cannot make changes. I note that the contents that I see in the /tmp directory appear to be related to App Store automatic download to be used to upgrade my Mac to Sierra if I request it in the future: perhaps something broke during this App Store process? I'm still not sure how to correct my system, though.

Edit2: I solved this problem by upgrading to Sierra. Probably the steps linked to by Slava below would mostly work but it sounds like the extended attributes would be lost so I chose to upgrade instead.
Recreation the link /tmp -> /private/tmp helped me (with csrutil disabled in recovery mode) : https://superuser.com/questions/1133065/unable-to-write-to-tmp-osx-unable-to-correct-permissions-operation-not-permitt#comment1629612_1133065

Looks like the Sierra installer makes /tmp rootless if you download and cancel it on the very first step of installation.