I had Windows XP on this box and it failed. Thinking it was corrupted OS I tried to reinstall, and it failed. But then I tried to install Ubuntu, and I could not run it from the USB or from the HD.

Did the mem test and found out one of my 512MB sticks (had 2) failed. I removed the bad one and was able to install Ubuntu but it was sluggish.

I was trying to quickly setup my packet radio for Hurricane Sandy. Downloaded the Serial Port Terminal and was able to get some use but the system kept locking up. So Installed Xubuntu next to it, planning on running out the next day to get RAM for the box. Put Xubuntu on and now I am getting the following error with serial port terminal.:

Cannot open /dev/ttyS0: Permission denied

I would like to be able to use serial port terminal, or equivalent with Xubuntu so I can use my kpc3 packet terminal, connect to the com port on the back of my computer.

Any ideas?

The tty devices belong to the "dialout" group, I suspect you are not a member of this group and hence are denied access to /dev/ttyS0, so you need to add yourself to that group.

First check if you are a member of that group:

groups ${USER}

..this will list all the groups you belong to. If you don't belong to the dialout grup then add yourself to it, for example:

sudo gpasswd --add ${USER} dialout

You then need to log out and log back in again for it to be effective. Then see if it fixes your problem.

  • Even being in dialout group user with id 1000 can't open serial port to read. After reboot. But, when I use sudo for the same executable, then it able to open /dev/ttyS0. What the possible reason? – Orient Aug 2 '17 at 12:31

The only solution that works for me is to: (every time I boot the machine)

sudo chmod 666 /dev/ttys0

It really needs to be fixed at time of installation. I'm on 15.10 and have tried 16.04 LTS, still the same there. Seems like such a simple fix.

The older versions 10.04LTS did not have this problem.

  • 1
    this work with raspberry pi 3 but when I reboot lost the permissions. – J261 Sep 14 '16 at 21:25
  • 1
    Adding permissions to my username for dialout worked fine, pretty simple fix. – DRJ101 Sep 16 '16 at 16:57

Had a look around various forums and it looks to be a bug related to permissions. Here's how I got around the problem (long version). You WILL need BOTH cu and setserial packages installed.

In three terminal tabs, monitored output from # tail -f /var/log/messages That's how we know if we have a /dev/ttyUSB0 or not.

In the second tab, simply ran a loop to ls -l this device to see it's permissions and it's group ID is 'dialout'. THIS is the critical bit. For some reason, your user MUST use this GID to do the cu, so...

In the third tab, as root, did # newgrp dialout (to correspond with the GID of dialout). Tested with # touch /tmp/anything ... doing ls -l on this file shows it is created by root with a dialout group, so we're ready to ... # cu -l /dev/ttyUSB0 In my case I needed to hit return again to see the expected prompt, in other cases speed may need to be specified.

  • This was the actual piece that helped me: For some reason, your user MUST use this GID to do the cu, so... . Thanks a million. – ΤΖΩΤΖΙΟΥ Jun 15 '15 at 8:46

You can just use this command:

sudo adduser $USER dialout

This will add the current user to the dialout group. Login and out it to take effect.

In my case the problem still exist, even when I add my user to group using:

So when I use :

sudo gpasswd --add ${USER} dialout

and when I type: groups I got this result:

ilyahoo adm cdrom sudo dip plugdev lpadmin sambashare

But when I type id -Gn ilyahoo the putput is:

ilyahoo adm tty dialout cdrom sudo dip plugdev lpadmin sambashare 

I know that there is a problem that I don't know what is it honestly.

To get a solution I just typed

newgrp ilyahoo

and the problem was fixed.

  • Welcome ilyahoo to askubuntu! Please try to format post according to our guide line. Try to format the output in a more readable manner. Thanks – abu_bua Jun 28 at 0:06
  • 1
    @abu_bua please use code formatting for command output, not quote formatting. – muru Jun 28 at 6:05

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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