keboose
Explorer
- Joined
- Mar 5, 2016
- Messages
- 92
I have a USB hotplug scanner: a Canon DR-2510C. I would like to use it to automate scanning important documents and receipts to my NAS, and I'm nearly there, but have hit a wall on the last few steps.
I'm aware that Freenas allowing USB device pass through to jails is kinda sketchy, but I've gotten 90% of the way there already. I made a jail (11.2 release), and enabled these flags in the settings:
Inside the jail, I installed three packages and dependents:
I would like to take it one step further. The package
I think that is the first major hurdle, at least. How would I change the permissions in the jail to allow another user to see USB devices?
I'm aware that Freenas allowing USB device pass through to jails is kinda sketchy, but I've gotten 90% of the way there already. I made a jail (11.2 release), and enabled these flags in the settings:
devfs_ruleset=3
mount_devfs=[checked]
allow_mount=[checked]
allow_mount_devfs=[checked]
Inside the jail, I installed three packages and dependents:
sane
, sane-backends
and scanbuttond
. With only those steps, the scanner is mostly functional. By running the command scanimage
with the appropriate flags (as root), I can scan anything placed in the scanner input tray to file. It was trivial to write a script that batch scans documents and names them with the current date.I would like to take it one step further. The package
scanbuttond
will (on a normal system) monitor attached devices, and run scripts based on button presses on the scanner itself. That sounds WAY better than having to ssh into my NAS and send an iocage command to run my script every time I want to scan something, but the service hangs when I try to run it (you can run it in the forground withscanbuttond -f
). There is no helpful output that I know of except a single line in /var/log/messages
:
That means at least part of it is that only the jail root user can see USB devices, and I'm pretty sure the package added its own user and/or group, so it is probably trying to run as those.scanbuttond: no known scanner found yet, waiting for device to be attached
I think that is the first major hurdle, at least. How would I change the permissions in the jail to allow another user to see USB devices?