How to configure your SCSI or USB scanner to work with SANE/XSANE from your
regular user account

When I try to run XSANE, the program reports "No devices found"
and doesn't see my scanner. When I run sane-find-scanner, the same thing happens
and the program reports that no scanners were found.

In the words of Linux Format Magazine, "Unix is traditionally rather restrictive
about users accessing physical devices, so everything is split up into multipe
groups in order for granular access to be provided."

In other words, this is one of those "permissions things".

Since root has access to everything, it should be no surprise that root has
no problem getting to the scanner.

Normal users, however, have very limited access to devices, so it will be necessary
to grant your particular user account access to the scanner (or any other device
that it otherwise would not have access to.)

For the purposes of this howto, we will consider my scanner, an HP C2520A 3644
SCSI scanner that I found in the trash a few years ago and put aside (and, boy,
am I glad I did!).

First of all, I needed to "find" my scanner, that is, to find out
what device it is using.

Obviously, if you have read the problem description, using sane-find-scanner from my regular account does me no good at all. But, running this command as
root should work:

In the case of a USB scanner, this will probably be different, e.g. it might
be /dev/usb, /dev/scanner or even something else. The point is, you can use
the above technique to find your scanner whereever it lurks.

Now, the next step is simply to add your user account to the disk group.

Either edit /etc/group and add your username (vmorgo in my case) to the line
of /etc/group beginning with disk like so:

or simply use usermod to do the trick. When using groupadd, the command would
be:

usermod -G samba,disk vmorgo

assuming that you are already (and wish to remain) a member of the group samba.

Remember that omitting the groups you are ALREADY a member of when using the
usermod command will result in DELETING your account from those groups!

When you are done and have saved your changes, you will need to log out and
log back in again for the new permissions to take effect. (How very Windows....)

NOTE:
Manually changing the permissions on /dev/sg0 (or any other item in /dev is
not recommended. In any event, the changes will not "stay" between
reboots; that is, they will be erased and undone at the end of the session.