John Syn <[email protected]> wrote: > > > On 8/17/14, 3:22 AM, "[email protected]" <[email protected]> wrote: > > >John Syn <[email protected]> wrote: > >> > >> On 8/16/14, 9:20 AM, "[email protected]" <[email protected]> wrote: > >> > >> >I want to read the ADC inputs on my Beaglebone Black without root > >> >privilege. Using the Adafruit_BBIO.ADC package in Python requires > >> >root privilege, are there any ways of doing it without? > >> Use group permissions. If you are part of a group and ADC is part of the > >> same group, you can access ADC without being root. > >> > >Er, ADC can't really be "part of a group" as it's not a user. > In Unix, everything is a file so you can assign groups to almost anything. > > > >If there *is* a group whose membership allows access to the ADC inputs > >then I'd like to know what it is. I've looked through /etc/group and > >there's nothing obviously associated with IO. > These are standard Unix/Linux concepts. I don¹t know how you are accessing > the ADC device (device, IIO, sys, etc), but the same principles apply. If > you are accessing a device for example (/dev/adc?) then you assign a group > to that device either in an init script or udev. If your userid is part of > the same group, then you don¹t need root permission to access that device. > Reading a good Linux book will explain this concept. > I've been using and programming on Unix/Linux systems since the early 1980s thank you.
The group associated with the /sys/devices/.... files associated with the ADC is 'root' and, anyway, the group only has read permission so even if I added my user to that group I wouldn't be able to configure the ADC subsystem. To set up the ADC one needs to write, similarly to access the GPIO one needs write. It would appear (if you do a few google searches for Beaglebone Black non-root access to IO) that the existing situation is that it's very difficult indeed to make IO on the BBB work for non-root users and quite a few people think this should be fixed. -- Chris Green · -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
