scanservjs

SANE scanner nodejs web ui

Getting started

Installation and setup

  1. Standard install
  2. Docker install
  3. SANE setup install
  4. Troubleshooting

Configuration

  1. Configuration
  2. Integration
  3. Recipes
  4. Using a proxy

Developing

  1. Development
  2. Localisation
  3. Testing
  4. References
  5. QNAP

View the Project on GitHub sbs20/scanservjs

QNAP NAS

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.

install [Works on QTS 4.2.2]

Get permissions working

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