Re: [SLE] iscan and user rights
Johannes Meixner wrote:
On Oct 19 13:16 Terje J. Hanssen wrote (shortened):
Trying to change owner on /dev/sg0 to my user works temporarily, so that I can start iscan without being root. The problem with this however, is that after rebooting, the system sets the owner back to root again.
/etc/init.d/sane-dev would do it automatically if it is enabled and if the scanner can be found during booting (i.e. when the scanner is switched on during booting and when "scanimage -L" detects it).
Verifyoing the scanner configuration in YaST2 hardware>scanner shows driver: epkowa scanner: Epson Perfection 1640 at epkowa:/dev/sg0 Testing the scanner commands, shows the same access problem as before: As normal user: ~> scanimage -L No scanners were identified. If you were expecting something different, check that the scanner is plugged in, turned on and detected by the sane-find-scanner tool (if appropriate). ~> sane-find-scanner # No SCSI scanners found. If you expected something different, make sure that # you have loaded a SCSI driver for your SCSI adapter. As root: # scanimage -L device `epkowa:/dev/sg0' is a Epson Perfection 1640 flatbed scanner # sane-find-scanner found SCSI processor "EPSON Perfection1640 1.03" at /dev/sg0 Verifying the "sane-dev" service and scanner permissons in /dev: In YaST2 System>System Services "sane-dev" is activated with "Yes"? However verifying the scanner permissions in /dev shows: ~> ls -la /dev/sg0 crw-r----- 1 root disk 21, 0 2005-10-20 01:21 /dev/sg0 Next I selected "sane-dev" and activated this service manual in Yast2. The following message box was displayed: "/etc/init.d/sane-dev start genererte 0 (fullført): Searching for configured scanners in SANE.. Setting scanner access mode to rw-rw-rw- for /dev/sg0 ..done" Now verifying the scanner permissions again: ~> ls -la /dev/sg0 crw-rw-rw- 1 root disk 21, 0 2005-10-20 01:21 /dev/sg0 Now both "scanimage -L", "sane-find-scanner" and "iscan" works for a normal user. However, after a reboot the user perimission problem occures again. Looks like there is a problem to activate the service "sane-dev" during startup. The scanner is on during startup, but I'm not sure it is detected by the system? ~> dmesg |grep scanner ~> ~> dmesg |grep scsi scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 7.0 scsi1 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 7.0 Attached scsi generic sg0 at scsi1, channel 0, id 2, lun 0, type 3 Attached scsi generic sg1 at scsi1, channel 0, id 3, lun 0, type 5 sr0: scsi3-mmc drive: 16x/16x writer cd/rw xa/form2 cdda tray Attached scsi CD-ROM sr0 at scsi1, channel 0, id 3, lun 0 ~> dmesg |grep sane ~> Thanks, Terje J. Hanssen
Hello, On Oct 20 00:39 Terje J. Hanssen wrote (shortened):
Looks like there is a problem to activate the service "sane-dev" during startup. The scanner is on during startup, but I'm not sure it is detected by the system?
When it is activated for the usual runlevels 3 and 5, it is started during booting. But it seems in your particular case it doesn't detect the scanner during boot. For example your scanner may take too long to wake up. There is a timeout in sane-dev to limit how long it waits for scanimage to detect a scanner. If the sane-dev output is "Aborted", the timeout had happened. Alternatively: I am neither a SCSI expert nor a hotplug expert nor a udev expert nor a HAL expert but as far as I understand it, hotplug/udev/HAL/whatever... creates the device nodes dynamically. Therefore it might happen on your particular system that the device node /dev/sg0 was not yet created when sane-dev runs during booting. Note that the kernel module "sg" must have been loaded to get the device node /dev/sg0 created and to access any SCSI scanner, see http://portal.suse.com/sdb/en/2004/04/thallma_scsiscanner_91.htm but note that the details may change from version to version. Additionally there will be further enhancements (e.g. "udev", "HAL", ...). An article regarding scanner setup cannot describe all the details about SCSI, hotplug, udev, HAL, and so on. Refer to the appropriate specific documentation if there are problems in one of these areas. Kind Regards Johannes Meixner -- SUSE LINUX Products GmbH, Maxfeldstrasse 5 Mail: jsmeix@suse.de 90409 Nuernberg, Germany WWW: http://www.suse.de/
participants (2)
-
Johannes Meixner
-
Terje J. Hanssen