[Nut-upsdev] Improving messages related to USB permissions
Arjen de Korte
nut+devel at de-korte.org
Sat Nov 22 21:20:54 UTC 2008
Citeren Charles Lepple <clepple at gmail.com>:
> Since the issue of USB permissions keeps coming up on the lists, I am
> wondering if there is something we can do to improve the messages
> printed at the default debug level when starting a USB driver.
What we could do here, is make a difference between not detecting a
device and permissions problems. There are probably a couple of places
in 'libusb.c' where displaying a debug message at level 2 is not
appropriate, but we really should bail out with a fatal_with_errno()
message instead. Permissions problems are not likely to go away
without intervention. I don't know how the other developers think
about this, but usb_claim_interface() failing seems to be a good one.
This would be common for all drivers using this (later on would only
work for HID PDC).
> For instance, it shouldn't be too hard to mention which user was
> configured for non-privileged operations. A lot of people tend to
> assume that unless indicated otherwise, starting a program as root
> means that it will run as root, and therefore not run into any
> permission problems.
Since permissions problems are a packaging problem in the case of USB
devices, I think we should aim more at the improvement of the
packaging. By the time end users run into problems like this, we're
too late.
> I know a lot of messages get hidden by the startup scripts, but does
> anyone have any thoughts as to why we wouldn't want to start looking
> at this?
I don't think it won't help the average Joe User to setup permissions
on his system. Most people that come to the mailing lists with
problems in this area installed a pre-compiled package. If thats
broken, the solution would be to fix the broken package, not that
particular installation. The latter might solve the problem for one
user, but all others using the same package will run into the same.
> For every person who emails the list with a problem, there will be
> several more who will just write the software off if they can't get it
> to work without some messages that explain things a little more.
See above.
> If nothing else, maybe we can have some URLs on networkupstools.org
> that will redirect to a wiki page or other relevant documentation.
What I would really like to see, is not only a list of supported
devices, but also a list of supported distributions.
All this would be a moot issue, if we had some kind of installation
wizard that would simply check during configuration if all
requirements for running NUT with a particular setup are met.
Currently, this is done only at build time, but this won't catch
packaging problems.
Best regards, Arjen
--
Please keep list traffic on the list
More information about the Nut-upsdev
mailing list