[plug] USB & kernel questions

Cameron Patrick cameron at patrick.wattle.id.au
Wed Dec 17 17:42:36 WST 2003


On Wed, Dec 17, 2003 at 05:18:55PM +0800, James Devenish wrote:

| What do people do, with Linux, for similar problems such as CD/DVD
| access, audio access, etc? All I've been able to suggest to people
| with stock kernels is to use filesystem groups or sudo, depending.

I use filesystem groups... the other common alternative is chmod 666
which is suboptimal if you remotely care about security but works
perfectly :-)

The USB problem, so far as I understand it, is that the device nodes
(actually I think they just look like normal files, but are magic in the
same way that the rest of the files /proc are) are created automagically
in /proc/bus/usb when a USB device is plugged in, and I have no idea how
to specify the permissions there such that they "stick".  Drivers for
things like scanners and cameras are normally handled pretty much
entirely in userspace (by sane, gphoto, etc), so ordinary users must
have write access to the appropriate files.

Alternatively, you can run stuff as root like I do - using a script that
runs by the hotplug subsystem whenever the camera is plugged in which
grabs all the photos, places them into a directory based on the date,
renames them using jhead, and chown's them to cameron... hmm, if anyone
on the list is interested in this script just shout.

Cameron.




More information about the plug mailing list