If I run tmux as root, it runs normally and fully functional. I created a couple users, and it will not run as any of the users.
create session failed: : No such file or directory
I checked the outside $TERM is xterm and inside $TERM is screen as FAQs suggest that is most common cause of problems.
I've used tmux regularly on many different systems, but I on this VPS I can't figure out what's up... A little help, please?
EDIT: Thanks to Jay's helpful advice about strace, I found a permissions problem with /dev/pty*. I fear this won't be a useful post for many others as it seems kind of a one-off problem.
strace -f -e trace=file tmux
32000 open("/dev/ptmx", O_RDWR) = -1 EACCES (Permission denied)
32000 open("/dev/ptyp0", O_RDWR) = -1 EACCES (Permission denied)
.....
32000 open("/dev/ptypf", O_RDWR) = -1 EACCES (Permission denied)
32000 open("/dev/ptyq0", O_RDWR) = -1 ENOENT (No such file or directory)
A more general way to solve a problem of this nature:
Look for
permission denied
/no such file or directory
errors right before it exits - might find a general reason behind why you're getting this error (that is, see what directory it was trying to create, then make it manually and observe the error, it might be that it's trying to make/home/x/some/dir
without/home/x/some
existing or something).This happened to me because my
tmux
daemon process was hitting its maximum process limit.After raising its maximum process limit (cf. Set max file limit on a running process) I was able to start my new session with
tmux new-session ...