2009-11-18 23:40

If you get the following errors starting screen as a user:

No more PTYs.
Sorry, could not find a PTY.
[screen is terminating]

You have to change /dev/ptmx file permissions:

# ls -l /dev/ptmx 
crw-r--r-- 1 root root 5, 2 nov 18 23:28 /dev/ptmx
# chmod a+w /dev/ptmx
# ls -l /dev/ptmx 
crw-rw-rw- 1 root root 5, 2 nov 18 23:34 /dev/ptmx

Under Ubuntu, there was no problem. Permissions already set:

$ ls -l /dev/ptmx 
crw-rw-rw- 1 root tty 5, 2 2009-11-18 23:37 /dev/ptmx

References :

  • man ptmx
  • ubuntu$ ls -l /dev/ptmx
2009-11-18 23:40 · Tags: ,


  1. Thanks, this fixed the problem on a Debian Squeeze VM preload image.


  2. Arvind Ramachandran

    I had a similar problem and I attempted a number of different solutions. Just wanted to share what made it work for me.


    Tried to use the screen program to connect my lab PC to a Raspberry PI via the USB ports and an RS232 cable.

    Ran the command screen /dev/ttyUSB0

    Got the following error messages in quick succession.

    “Cannot access line ‘/dev/ttyUSB0 for r/w: permission denied”

    “Couldn’t find a PTY”

    Attempted solutions

    I tried to look in the activity monitor to see if there are any processes running, and there was none. So this was not the problem.

    Tried to change the /dev/ptmx file permissions

    Ran the command ls -l /dev/ptmx

    Output crw-rw-rw- 1 root root 5, 2 “datetime” /dev/ptmx

    So it looked like the permission were already set. So this was not the problem either.

    Tried to mount /dev/pts by running
    sudo mount devpts /dev/pts -t devpts -o mode=620

    I got the message that the mounting was already done. Move on.

    Finally found this idea of adding to the dialout group looking at this post.

    Ran the command – sudo usermod -a -G dialout $USER

    Restarted the computer and voila, it worked. Was able to use screen program to make the connection.

    Spend a few hours to figure this out. Hope this helps someone out. Peace.


  3. What works for me: unplug device from computer (i.e., usb serial adapter) then plug back in again


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>