LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   automatic set permission to device at boot (https://www.linuxquestions.org/questions/linux-software-2/automatic-set-permission-to-device-at-boot-242255/)

mrosati 10-13-2004 02:11 PM

automatic set permission to device at boot
 
hi all.
i use xsane to make my scanner work. i can use it through libusb. i have managed to use the scsanner but i have to change permission to /proc/bus/usb/002/002 to use it when i log as normal user.
is there a way to automatically set permission to a device (/proc/bus/usb/002/002) at boot?

thank you

Matteo

randyding 10-14-2004 12:03 AM

Gentoo may have a similar mechanism ( I don't know ), but in Redhat you would edit the file /etc/security/console.perms
This changes the file permissions on selected devices for whoever logs into the console.

otoomet 10-14-2004 01:19 AM

Dear Matteo,

which kernel do you use? Do you have scanner drivers in kernel? There is a quick way to change the USB permissions on 2.6 kernel. In your /etc/fstab you should have a line like

usbfs /proc/bus/usb usbfs defaults,devmode=0666 0 0

the option devmode gives everyone the read-write access to all usb devices. But beware, there was a bug in kernels < 2.6.8 so it did not work. There is a better but a bit more complicated way of doing it, using hotplug.

Things may be different, though, if you have corresponding kernel drivers installed.

Best,

Ott

mrosati 10-14-2004 03:05 AM

thank you! in fact my kernel is a 2.6.8-r8 and it works fine with your help! bye!

Matteo


All times are GMT -5. The time now is 07:16 AM.