'Operation not permitted when trying to open tmux

When I try to initiate tmux session it gives me the following error.

error creating /private/tmp/tmux-501 (Operation not permitted)

I am using apple M1 (Big Sur version 11.5.2). Any suggestion?



Solution 1:[1]

It was not just with tmux but I couldn't read/write on the /tmp folder even with sudo permission. This blocked me from using apps that require its use.

I couldn't find the actual reason behind it, I think it was locked by another program which terminated badly. The only option I could have opted for at this point was to reboot my system.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Skaranjit