Hope these comments will also help: It is relevant here whether one is using devfs or not. If one is using devfs, then the devices /dev/sg* do not exist, unless and until the sg module gets loaded. In any event, if these files are created when the machine gets booted up (presumes that the module gets loaded and the scanner is attached to the computer too. Then it is possible (on my Slackware system) to edit the file
/etc/rc.d/rc.local which is the last thing run during the boot sequence, and put in a command which says something like chmod 666 /dev/sg1 and then all is OK. I presume that on other distros there is a file with a similar role to /etc/rc.d/rc.local on a Slackware system. Presumably it will be found somewhere in an /etc/rc(something) directory. Theodore Kilgore On Sun, 2 Mar 2003, Henning Meier-Geinitz wrote: > Hi, > > On Sun, Mar 02, 2003 at 06:12:55PM +0800, Stephen Liu wrote: > [setting up permissions for /dev/sg*] > > 1) Yes, I have to do it every single time after login, logout and > > relogin. It is not convenient. Any solution? > > That's done by your distribution. I guess it's done with PAM. Check > your distribution's manuals for this keyword. > > I'm pretty sure you can change the setup so everytime you login you > /dev/sg1 gets the right permissions. > > > 2) What is the difference between 0777 and 0666 > > ls -l /dev/sg1 should show the result. Executable rights doesn't make > sense for device files, as you don't want to run them :-) > > > 3) My scanner is connected to a SCSI card besides the CDWriter is also > > simulated as scsi connection. That are all SCSI devices in my PC > > 4) How to create a new group for scanner > > man addgroup. But please make sure that you understand what you are > doing. It may not be necessary if you do what I wrote about 1). > > > >>mode of `/dev/sg1' changed to 0777 (rwxrwxrwx) > > >># /sbin/insmod aha152x aha152x=0x140,9,7,0 > > > > > > > > > You can either put the line "aha152x aha152x=0x140,9,7,0" in > > > /etc/modules to have the module loaded at boot-time with the right > > > parameters, or place a line "options aha152x aha152x=0x140,9,7,0" in > > > /etc/modutils/aliases to tell insmod/modprobe which options to use > > > when loading the module. Remember to run update-modules after > > > modifying /etc/modutils/aliases. > > > > 1) Update-modules is not in my system. Type update-modules could not > > find it. > > That's for the Debian distribution. > > > 2) Neither modutils directory nor the file 'aliases' exist > > Put the options line in /etc/modules.conf instead. And place "modprobe > aha152x" somewhere in the boot scrips, e.g. /etc/init.d/boot.local if > it exists. > > > Edit /etc/modules.conf adding a line at the bottom > > > > alias parport_lowlevel parport_pc > > alias eth0 8139too > > alias eth1 8139too > > alias sound-slot-0 ymfpci > > post-install sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -L > > >/dev/null 2>&1 || : > > pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S > > >/dev/null 2>&1 || : > > alias usb-controller usb-uhci > > /sbin/insmod aha152x aha152x=0x140,9,7,0 > > No! /etc/modules.conf is not a shell script. man modules.conf. > > Put the options line in this file. Now you don't need to give the > options everytime you call modprobe aha152x. > > Bye, > Henning > _______________________________________________ > Sane-devel mailing list > sane-de...@www.mostang.com > http://www.mostang.com/mailman/listinfo/sane-devel >