public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Q: device(file) permissions for USB
@ 2001-12-06 20:01 kees
  0 siblings, 0 replies; 14+ messages in thread
From: kees @ 2001-12-06 20:01 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 449 bytes --]

Hi,

I have been playing with an USB camera. I've run into the following
problem:
The (default?) permissions for /proc/bus/usb/001/011 (and others) are
0644. This makes the ioctl (see attached trace to fail). So I have to:
either chmod the usb device file each time I unplug and replug the camera
OR make the pencam program SUID root, which is neither comfortable.
Is there a way to affect the default permissions for the USB devices?

regards
Kees

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1079 bytes --]

open("/proc/bus/usb/002/001", O_RDONLY) = 5
read(5, "\22\1\0\1\t\0\0\10\0\0\0\0\0\0\0\2\1\1", 18) = 18
close(5)                                = 0
ipc_subcall(0x4, 0x804e568, 0x400, 0)   = 0
close(4)                                = 0
open("/proc/bus/usb/001/011", O_RDWR)   = -1 EACCES (Permission denied)
open("/proc/bus/usb/001/011", O_RDONLY) = 4
ioctl(4, 0x80045505, 0xbfffeaf8)        = -1 EPERM (Operation not permitted)
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 7), ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
ioctl(1, TCGETS, {B9600 opost isig icanon echo ...}) = 0
write(1, "pencam_set_configuration error\n", 31) = 31
ioctl(4, 0xc0105500, 0xbfffeaac)        = -1 EPERM (Operation not permitted)
ioctl(4, 0xc0105500, 0xbfffeaac)        = -1 EPERM (Operation not permitted)
write(1, "Last error: 255,  command = 0xff"..., 33) = 33
write(1, "Camera ping failed!! Check conne"..., 54) = 54
write(1, "Error initializing camera!!\n", 28) = 28
close(4)                                = 0

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2001-12-07  0:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <fa.ljcupnv.1ghotjk@ifi.uio.no>
2001-12-06 20:14 ` Q: device(file) permissions for USB Jonathan Hudson
2001-12-06 21:30   ` Rene Rebe
2001-12-06 23:27     ` Greg KH
2001-12-06 23:37       ` Alexander Viro
2001-12-06 23:57         ` Rene Rebe
2001-12-07  0:09           ` Alexander Viro
2001-12-07  0:20             ` Rene Rebe
2001-12-07  0:21             ` Richard Gooch
2001-12-07  0:35               ` Rene Rebe
2001-12-06 23:45       ` Rene Rebe
2001-12-07  0:00         ` Greg KH
2001-12-07  0:11           ` Rene Rebe
2001-12-07  0:21             ` Greg KH
2001-12-06 20:01 kees

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox