Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#8434 closed defect (fixed)

ttyUSB devices should be accessible by user olpc

Reported by: pgf Owned by: cscott
Priority: normal Milestone: 8.2.0 (was Update.2)
Component: security Version: Development build as of this date
Keywords: csafor8.2 Cc: mstone, gregorio, jmaloney@…
Blocked By: Blocking:
Deployments affected: Action Needed: test in release
Verified: no


currently (some) USB serial devices are supported on the laptop, including the Scratch sensor board. but because tty devices normally require privileged users, the devices aren't accessible without modifying system configuration.

we should create a udev rule to set the correct permissions by default on device insertion -- this rule should be placed in a file in /etc/udev/rules.d, and should contain:

KERNEL=="ttyUSB*", MODE="0666"

(thanks to john maloney for reminding us of this. i meant to report it some time ago.)

Change History (13)

comment:1 Changed 9 years ago by cscott

  • Action Needed changed from never set to code
  • Cc mstone added
  • Component changed from not assigned to security
  • Owner set to cscott
  • Version changed from not specified to Development build as of this date

Copying from the devel thread (

The XO currently sets the group for /dev/ttyUSB0 to 'uucp'.
So, my proposal is that (a) the 'olpc' user be added to the 'uucp'
group, and (b) that the file may be used to request
that the activity's "isolated" UID also be a member of the uucp group.
for Michael's documentation of the file).

Does this seem right to you, Michael?  I think rainbow already has a
mechanism to create local copies of /dev/video etc for access to the
camera, etc; perhaps he'd prefer to use that mechanism instead.  (I
personally like trying to use the traditional groups for their
intended purposes whenever possible, to avoid surprises.)

comment:2 Changed 9 years ago by gregorio

  • Cc gregorio added
  • Milestone changed from Not Triaged to 8.2.0 (was Update.2)

I think we should allow this code in if we can show that it wont have any unintended consequences.

Michael and team, please evaluate and approve or comment as needed.

Would love to have scratch data gathering tool supported if we can!


Greg S

comment:3 Changed 9 years ago by mstone

  • Action Needed changed from code to test in build

rainbow-0.7.22 released into joyride with a 'use-serial' permission that should do the trick.

comment:4 Changed 9 years ago by cscott

  • Keywords csafor8.2 added

pilgrim patch 714e94ab21269cc481a82b1de1d64414036e418f adds olpc to group uucp. Should be in joyride as well.

Can we get some testing of this, so that we can move this into the stable build? k, thx.

comment:5 Changed 9 years ago by cscott

comment:6 Changed 9 years ago by cscott

  • Action Needed changed from test in build to test in release

comment:9 Changed 9 years ago by pgf

i had hand-applied the change to my 759 machine last night, and couldn't get it to work, most likely because of user error. i will upgrade to 760 today and try again. i did notice that the change mimics similar code that's in place for adding the "camera" and "microp" groups, neither of which exists, which made me wonder how much use testing these use-cases have had.

(with my hand-applied change, my activity was still not a member of group 'uucp'. i was stymied by not being able to get full rainbow logging -- i've asked michael about that.)

comment:10 Changed 9 years ago by pgf

the current rainbow code looks for in the bundle directory, rather than in the activity sub-directory. once this is accounted for, the code works fine.

comment:11 Changed 9 years ago by gregorio

  • Cc jmaloney@… added

Hi John,

FYI on this bug which I believe affects Scratch sensor board.

BTW I hope that you got the word that we have had a huge swell of demand and interest in Scratch on the XO. I know kids in Uruguay have been posting their scratch projects and I have heard from deployments in Birmingham, Haiti, Rwanda and elsewhere that they are very interested in using Scratch. Not to mention my kids in Newton where there has been some scratch interest growing virally after it was mentioned by a Math teacher at Cabot school.

Great job with this app!


Greg S

comment:12 Changed 9 years ago by cscott

pgf: yes, 760 should have the rainbow fix to move into the activity subdir.

comment:13 Changed 9 years ago by pgf

  • Resolution set to fixed
  • Status changed from new to closed


to summarize: if your Activity needs a USB tty device, then you need to add a line that says "use-serial" to the "activity/" file.

Note: See TracTickets for help on using tickets.