Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've gotten a newly imaged Debian 6 32 bit VPS. While configuring I tried to test screen as a number of my scripts run using it.

Root has no problem running screen. But of course this is unacceptable.

The message I received is "No more PTY's. Sorry could not find a PTY"

I did a little googling and found it to be a common problem with permissions. I checked the permissions on /dev/ptmx and /dev/pts as well as the several /dev/ptyp* descriptors. They all had proper read/write permission

:~$ ls -l /dev/ptmx
crw-rw-rw- 1 root tty 5, 2 Jul 31 07:35 /dev/ptmx
:~$ ls -l /dev/pty*
crw-rw-rw- 1 root tty 2,  0 Jul 31 01:19 /dev/ptyp0
crw-rw-rw- 1 root tty 2,  1 Jul 31 01:19 /dev/ptyp1
crw-rw-rw- 1 root tty 2,  2 Jul 31 01:19 /dev/ptyp2

/dev/pts is mounted. From all the solutions it seems my non-root user should be able to run screen.

Is there anything else I can do?


root@:~# dpkg -l screen
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                                  Version                                                                    
ii  screen                                                4.0.3-14                                              terminal multiplexor with VT100/ANSI terminal emulation
root@:~# ls -l /usr/bin/screen
-rwxr-xr-x 1 root utmp 328508 Jul 28  2009 /usr/bin/screen
share|improve this question
One thing you can do would be make sure it is using ptmx and not those crusty old ptyp* devices. Since it works as root, run it as root and then run the tty command in the shell inside screen. It should give you an answer of /dev/pts/NUMBER. Also show us dpkg -l screen and ls -l /usr/bin/screen – Alan Curry Jul 31 '12 at 7:53
Root's tty is /dev/pts/4. – Jay Jul 31 '12 at 17:02
So that's one thing eliminated. Still waiting on dpkg -l screen and ls -l /usr/bin/screen and while you're at it, see if there is any other screen lurking in /usr/local/bin or some other place in the user's $PATH – Alan Curry Jul 31 '12 at 21:45
Sorry Alan for not replying. I asked my former colleague to check over the full vps config and he found an obscure permission on pt_chown which he immediately changed and remedied the situation. – Jay Aug 11 '12 at 19:57
I like to think I would have got that after a few more questions... – Alan Curry Aug 11 '12 at 22:50
up vote 2 down vote accepted

After some investigation with my old colleague he pointed out that there was a problem with pt_chown permissions.

This is the solution for Centos 5/6 and Debian that may also incur this weird problem mostly on VPS images.

I didn't record the initial permissions of pt_chown but after changing them via this command my PTY issue has been solved.

chmod u=rwxs,g=rx,o=rx /usr/libexec/pt_chown; #/usr/lib/pt_chown on debian 6
chown root:root /usr/libexec/pt_chown; #/usr/lib/pt_chown on debian 6
share|improve this answer

For me (vps on an openVz host) the following do the trick:

cd /dev
sudo MAKEDEV ptyp ptyq
share|improve this answer

Your Answer


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.