[sane-devel] Re: How to configure sane, xsane, etc.

David Neary David@phenix.fr
Wed, 9 Jun 2004 14:10:52 +0200


Hi Fran=E7ois,

Fran=E7ois Patte said:
> I am facing a big problem with xsane from fedora C1. (xsane-0.91-1):
>=20
> 1- I have a scanner Nikon LS-2000. The first person who ran=20
> xsane was not=3D
>  root
> and it now impossible to change the owner and right of the=20
> device /dev/sg0.

I have just come across more or less the same problem, and have tracked =
down
the answer.

It seems to be a problem with the default PAM set-up on redhat.

When you start a console, you can use PAM to control access to system
resources (such as a flash card, or scanner, etc) for the duration of =
the
session, and on finishing the session have the permissions revert to =
sane
defaults.

The file which configures how this is done is in
/etc/security/console.perms. You should look for a line which says =
something
like=20
<console> 0600 <scanner> 0600 root

This says that if a user logged on to a console tries to access a file =
in
the scanner class, the permissions on the file will be set to 0600, =
with his
ownership, and when he's finished they'll revert to 0600 and root =
ownership
(at least, I think that's what it means, I don't understand it too =
well).

If you remove this line, restart pam, and change the permissions on =
/dev/sg0
to what you want, they should stick.

Cheers,
Dave.

--
David Neary
Phenix Engineering
110 ave Jean Jaures, 69007 Lyon=20