Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

My system is Ubuntu 13.04 and works fine, but I had to installed VirtuaBox to guest Windows XP which is essential tu run an application that dialogues with an alarm set by a USB-to-Serial adapter.

VirtualBox uses ttyS0 as Serial port and the communication can start efficiently only if command sudo chmod 666 /dev/ttyS0 is given to Terminal.

Every time I boot Ubuntu, ttyS0 file permissions return to default values and I have to run chmod every time I boot-up.

My question is: how can I change /dev/ttyS0 file permission permanently? If this is not a good practice, are there other manners to solve the issue?

share|improve this question

2 Answers 2

There's no need to change system file's permissions. The serial devices have the following default permissions:

crw-rw---- 1 root dialout ... /dev/ttyS0

So all you have to do is add the user to the dialout group:

sudo adduser $USER dialout
share|improve this answer
Thanks Eric, your solution worked for me after rebooting! Claudio :) –  Claudio Nov 12 '13 at 7:36
reboot is not required, re-login es enough. if you don't want to close your session you can also do ssh $USER@localhost (if you have openssh-server installed) and use that terminal. –  rrosa Oct 20 '14 at 13:45

Solution 1: check group of ttyS0 and then assign it to your user,then relogin or su - user

crw-rw---- 1 root dialout 4, 64 feb 28 18:23 /dev/ttyS0
usermod -aG dialout youruser
su - youruser

Solution 2: if you don't like the first solution edit /etc/udev/rules.d/50-tty.rules

KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="whateveryouwant"

restart udev or reboot and of course before add your user to selected group

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.