Tmux new-session returns: "can't create socket"
Problem occurs maybe by dead tmux process if you check output for strace -f -e trace=file tmux command.
You see socket file created by tmux, in my case is located on /tmp//tmux-1001/default/
You simply delete this file and run again byobu command.
Check the permissions of the /tmp/tmux*/
directories. They should be owned by you and not accessible to anyone else.
So change permission as:
chmod 700 -R /tmp/tmux*
It is important that the socket directory is owned by you and not accessible by everyone, or any user could use your tmux server. For a while, tmux incorrectly skipped the access mode check, this was fixed in 2.0.
If your system doesn't support creating directories in /tmp with the right ownership, you will have to use -S to point it explicitly to a socket. The check is important and we are not going to support systems that do not have Unix file permission semantics.
I encountered the same problem and below is my solution:
- Create a new folder:
/tmp/$(id -u)
- Change owner:
chown -R $(id -nu):$(id -nu) /tmp/$(id -u)
- Change permission:
chmod -R 700 /tmp/$(id -u)
It works!