[Pkg-phototools-devel] udev rules HP Photosmart (was: Digikam stopped detecting my HP Photosmart camera...)
Marco d'Itri
md at Linux.IT
Thu Jul 10 23:06:32 UTC 2008
On Jul 10, Mark Purcell <msp at debian.org> wrote:
> 1. Looking through the udev bug reports, it would appear that for a printer/
> multi function device from HP that MODE="0664" would be better and would
> allow use with the upstream OWNER="root", GROUP="lp".
These are the default permissions of USB devices.
The upstream rules are silly and should not set OWNER="root" which is a
no-op.
Your rules are broken too, because if you remove the read bit for others
lsusb will not show the devices and people will be annoyed. Just do not
use MODE, the default of 664 is correct.
BTW, modifying /etc/sane.d/dll.conf from an udev rule does not work well
because when the rule is run at boot time the scanner will not have been
plugged in yet. Please don't do this.
> ! The udev 55-hpmud.rules file sets the default Unix permissions to 666 which
> ! allow read/write to "owner", "group" and "other" users. This means anybody
> ! can use this HP printer. If you want to change this user policy, then you
Hopefully no distribution is accepting as-is this insecure crap.
> > libgphoto2-2 ships: /etc/udev/rules.d/025_libgphoto2.rules
> > which contains:
This rules file should not set MODE either...
> > ...HPLIP is assuming that all Photosmart products are scanners, which
> > may well be true and correct (if it is not feasible to list individual
> > idProduct's for whatever reason). However, since it does so after
> > libgphoto's rules are read, it messes up access to Photosmart cameras.
This should be clarified first: are both packages supposed to access the
same device or just libgphoto?
> > Simply swapping the order of the two .rules files serves to get Digikam
> > working again--but libgphoto's .rules would need to start setting an
> > OWNER to ensure that camera devices don't end up owned by lp.plugdev!
So it's not actually working if both packages need to access the same
device.
> > 1) the PhotoTools Maintainers can fix this problem by renaming 025_* to
> > (say) z60_* and adding (perhaps) OWNER="root" to each entry.
For a start, the ???_ prefixes have been superseded by ??- prefixes
which are used by other distributions as well.
BTW, recent udev releases set the default permissions at 91-, which is
much later than what other distributions do (so the rules file can
benefit from the environment variables set by earlier rules).
I do not know which users and groups are actually required by each
package, so I'd rather not comment about the best order of rules files.
But I want to stress that it's a bad practice to write rules which
depend on their relative order with respect of the rules of a different
package.
> > 2) the HPLIP Maintainers can fix the problem by getting upstream to
> > provide individual idProduct codes (which may or may not require the
> > cooperation of the manufacturer).
If there is no intersection among the devices supported by each package
then this one is the correct solution even if it takes some more work.
Otherwise, I think your packages should agree on a common user or group.
> SUBSYSTEM=="ppdev", OWNER="lp", GROUP="scanner", MODE="0660"
Please remove MODE here and later in the rules file.
--
ciao,
Marco
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-phototools-devel/attachments/20080711/8c489c5f/attachment.pgp
More information about the Pkg-phototools-devel
mailing list