Ticket #8434 (closed defect: fixed)

Opened 6 years ago

Last modified 5 years ago

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@…
Action Needed: test in release Verified: no
Deployments affected: Blocked By:
Blocking:

Description

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

Changed 6 years ago by cscott

  • cc mstone added
  • owner set to cscott
  • next_action changed from never set to code
  • component changed from not assigned to security
  • version changed from not specified to Development build as of this date

Copying from the devel thread (http://lists.laptop.org/pipermail/devel/2008-September/019135.html):

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 permissions.info file may be used to request
that the activity's "isolated" UID also be a member of the uucp group.
 (See http://wiki.laptop.org/go/Activity_bundles#activity.2Fpermissions.info
for Michael's documentation of the permissions.info 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.)

Changed 6 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!

Thanks,

Greg S

Changed 6 years ago by mstone

  • next_action changed from code to test in build

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

Changed 6 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.

Changed 6 years ago by cscott

Changed 6 years ago by cscott

  • next_action changed from test in build to test in release

Changed 6 years ago by cscott

Changed 6 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.)

Changed 6 years ago by pgf

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

Changed 6 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!

Thanks,

Greg S

Changed 6 years ago by cscott

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

Changed 6 years ago by pgf

  • status changed from new to closed
  • resolution set to fixed

confirmed.

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

Note: See TracTickets for help on using tickets.