[Xastir] th-d72a

Curt, WE7U curt.we7u at gmail.com
Sat Mar 12 19:10:41 EST 2011


On Sat, 12 Mar 2011, Kurt Savegnago wrote:

> When I plug something in to the USB port, I have to do a
> sudo chmod 777 /dev/ttyUSB0 from a terminal

That opens up the port to everyone for read/write.  A better way is to do this first to see which group owns the port:

     ls -l /dev/ttyUSB0

For instance:

   > ls -l /dev/ttyS*
   crw-rw---- 1 root dialout 4, 64 2011-03-12 16:01 ttyS0
   crw-rw---- 1 root dialout 4, 65 2011-03-10 01:39 ttyS1
   crw-rw---- 1 root dialout 4, 66 2011-03-10 01:39 ttyS2
   crw-rw---- 1 root dialout 4, 67 2011-03-10 01:39 ttyS3
   crw-rw---- 1 root dialout 4, 68 2011-03-10 01:39 ttyS4
   crw-rw---- 1 root dialout 4, 69 2011-03-10 01:39 ttyS5
   crw-rw---- 1 root dialout 4, 70 2011-03-10 01:39 ttyS6
   crw-rw---- 1 root dialout 4, 71 2011-03-10 01:39 ttyS7

In this case I would add the "dialout" group to my user account via "yast2" (OpenSuSE's admin program), then log out as that user and log in again to get the new privileges.  The above lines tell me this:

   The "root" owner has read/write privileges.
   The "dialout" group has read/write privileges.
   "Other" users have no privileges on this port.

The "777" you talk about above would change them to this:

   crwxrwxrwx 1 root dialout 4, 64 2011-03-12 16:01 ttyS0

Which gives read/write privileges to the "other" group (as well as execute privileges to all three groups of users) but is a bad idea security-wise.

-- 
Curt, WE7U.        http://www.eskimo.com/~archer
APRS:  Where it's at!        http://www.xastir.org



More information about the Xastir mailing list