Difference between revisions of "Scanner Server"
m (ScannerServer moved to Scanner Server) |
|
(No difference)
|
Revision as of 16:03, 31 August 2009
Preventing permissions issues
We want to make the scanner RW for a scanner group, that Apache is a member of and has access to. To do this, start by making a new group:
su -
groupadd -r scanner
Add apache and root to the new group:
usermod -a -G scanner apache
usermod -a -G scanner root
Next, we need to tell the system to set the scanner permissions so it uses the new group.
To do that, we need to know how to identify the scanner. I'm assuming you have a USB scanner; if not, the process is similar, but I'm not sure how to identify the scanner correctly.
With the scanner plugged in, run the lsusb command. You'll get several lines like this:
Bus 001 Device 002: ID 046d:c00e Logitech, Inc. Optical Mouse
Look for the one that looks like it's for your scanner, and write down the two numbers next to ID (in this case, if the mouse was actually a scanner, 046d and c00e). The left number is the vendor ID, and the right is the product ID. Another option is to look here: http://www.linux-usb.org/usb.ids for your manufacturer and product.
Go to /etc/udev/rules.d/ AS ROOT.
Create a file 15_scanner.rules that contains:
SUBSYSTEM=="usb", ATTR{idVendor}=="<left number from lsusb>", ATTR{idProduct}=="<right number from lsusb>", ACTION=="add",NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", GROUP="scanner",OPTIONS+="last_rule"
This tells the system "If this SPECIFIC USB device is plugged in, make it part of the scanner group with the default permissions (RW by owner and group), and stop processing rules.
Save the file, and unplug and replug your scanner. That should be it.