Ubuntu – Serial port terminal > Cannot open /dev/ttyS0: Permission denied

serial port

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?

Best Answer

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.