SANE scanner nodejs web ui
This page is more or less abandoned. I no longer have any QNAP hardware and am unable to test or experiment.
It’s likely that the application will work at a fundamental level, but will require some effort to install the necessary packages.
These instructions may serve as a useful starting point to get going. I will gladly receive PRs which either update this document or assist with creating a QNAP package.
lsusb
to check the scanner is attachedopkg update
opkg install sane-frontends imagemagick sudo
sane-find-scanner -q
scanimage -L
Pretend to be httpduser
sudo -i -u httpdusr
If (when) that fails you need to edit sudoers and try again
echo "admin ALL=(ALL) ALL" >> /opt/etc/sudoers
Once you’re httpdusr then
/opt/bin/scanimage -L
There are any number of problems you might face here. Your user probably won’t have access to “scanimage” or usb devices or the sane.d directory. And you should probably do this with a group privilege.
addgroup scanner
usermod -G scanner httpdusr
chgrp scanner /dev/usb/*
chmod g+rw /dev/usb/*
chgrp scanner /opt/bin/scanimage
chmod 644 /opt/etc/sane.d/*
Find out the bus and device of your scanner using lsusb
…
Bus 003 Device 003: ID 04a9:220d Canon, Inc. CanoScan N670U/N676U/LiDE 20
Then do this: chgrp scanner /proc/usb/{bus}/{dev} - so I did this:
chgrp scanner /proc/usb/003/003