
11
6.2.1. Granting access to the serial port
If the serial port cannot be accessed, the most probable reason is that the serial port device node does not
have read/write permissions for standard users.
To print the serial port permissions open a console and execute the ls command, specifying the actual
serial port device node in place of /dev/ttyS0.
$ ls –l /dev/ttyS0
crw------- 1 root dialout 4, 64 2007-03-26 08:37 /dev/ttyS0
The ls command lists the owner (root), group (dialout), and permissions (crw-------) of the serial port
/dev/ttyS0. The serial port permissions are organized as follows:
To make the serial port accessible to every user, add read/write permissions for the Group and Others.
Open a console and execute the chmod command, as root, specifying the actual serial port device node
in place of /dev/ttyS0.
# chmod 666 /dev/ttyS0
Kubuntu distribution does not usually have a 'root' user. To execute
commands as root you need to prepend the 'sudo' command to the
command you want to execute. Example: 'sudo chmod 666 /dev/ttyS0'.
You can also permanently work with root permissions by executing the
command 'sudo –s'.
This command grants read/write access to the serial port for every user. Check the new permissions with
the ls command:
$ ls –l /dev/ttyS0
crw-rw-rw- 1 root dialout 4, 64 2007-03-26 08:37 /dev/ttyS0
Comentários a estes Manuais