Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)

share|improve this question

1 Answer 1

up vote 6 down vote accepted

A more general way to solve a problem of this nature:

strace -e trace=file tmux ..restofyourcommand...

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).

share|improve this answer
    
Thanks for the suggestion. I'm afraid I didn't get any further. I tried messing with permissions on /var/run/tmux but didn't get anywhere. What does getcwd mean? –  bumbling fool Jul 6 '12 at 15:13
    
Would you like to try with strace -e trace=all and paste that in? Not sure what to recommend other than that. getcwd just means get current working directory. –  Jay Jul 6 '12 at 15:44
    
I tried to make some sense of it but I'm lost. Your continued input would be appreciated. New strace output / pastebin link edited in. –  bumbling fool Jul 6 '12 at 18:58
    
I completely forgot to account for the fact that tmux will fork off other processes. Can you try strace -f -e trace=file tmux ...? You can guess what I'll ask for next if that doesn't help :-) –  Jay Jul 6 '12 at 21:13
    
Thanks! (see edit) –  bumbling fool Jul 7 '12 at 10:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.