Scanner only detected as root not as regular user (without rights?)

Code:
#scanimage -L
Outputs:
Code:
device `epson2:libusb:000:008' is a Epson PID 084D flatbed scanner

Code:
#sane-find-scanner -q
Outputs:
Code:
could not fetch string descriptor: No such device (it may have been disconnected)
found USB scanner (vendor=0x04b8 [SEIKO EPSON], product=0x084d [USB MFP]) at libusb:000:008

I changed /usr/local/etc/devd/saned.conf to
Code:
notify 100 {
        match "system" "USB";
        match "subsystem" "INTERFACE";
        match "type" "ATTACH";
        match "cdev" "ugen[0-9].[0-9]";
        match "vendor" "0x04b8";
        match "product" "0x084d";
        action "chown -L cups:saned /dev/$cdev && chmod -L 660 /dev/$cdev";
};

My /etc/devfs.rules is
Code:
[system=10]
add path 'usb/*'    mode 0660 user x group usb
add path 'ugen*'    mode 0660 user x group usb
add path 'ugen*.*'  mode 0660 user x group usb
add path 'usbctl'   mode 0660 user x group usb
add path 'usb*'     mode 0660 user x group usb
add path 'uscan*'   mode 0660 user x group usb
add path 'pass*'  mode 0666 group operator
add path 'xpt*'   mode 0666 group operator

My /etc/devfs.conf is
Code:
    link    cd0        cdrom
    link    cd0        dvd
    perm    acd*            0666
    perm    cd*             0666
    perm    da*             0660
    perm    pass*           0666
    perm    xpt*            0666
    perm    uscanner*       0666
    perm    video*          0666
    perm    tuner*          0666
    perm    devstat            0444
    own       /dev/da0      x:operator
    perm      /dev/da0      0660
    own          /dev/cd0        x:operator
    perm      /dev/cd0        0660
    own     vboxnetctl root:vboxusers
    perm    vboxnetctl 0660
 
I found a similiar issue with serial port. The serial port device could be operated by root|wheel but the default permission was incorrect. I needed to run a script before using serial port.
Code:
#!/bin/sh
echo
echo "----- fix_tty.sh:  set permissions for RS232 or RS485 -----"
uname -mrs
echo "check if RS232 or RS485 uart is present"
ls -lga  /dev/ttyu0
if  [ -e /dev/ttyu0 ]; then
    echo  "has serial port uart"
    chmod  g+rw  /dev/ttyu*
else
    echo  "no serial port 0"
fi
ls -lga /dev/ttyu*
echo  "--------------"

echo "check if USB RS232 or RS485 adapter is present"
ls -lga  /dev/ttyU0
if  [ -e /dev/ttyU0 ]; then
    echo  "has USB serial adapter"
    chmod  g+rw  /dev/ttyU*
else
    echo  "no USB serial adapter"
fi
ls -lga /dev/ttyU*
echo "======== bye ======="
echo
 
Following the desktop installation guide and forum tips, I have always set wheel, operator, video for the main desktop user, so that I can mount the storage devices and login with su for temporary sysadmin tasks. In short, the scanner always worked. Is it a bad idea?
 
Back
Top