Thursday, September 17, 2020

Re: xsane under 6.7

On Wed, Sep 16, 2020 at 10:04:12PM -0600, Austin Hook wrote:
>
> The docs kept saying make sure your device has the necessary permissions,
> without saying exactly in which sense that was meant.
>
> Finally, a few weeks ago I got most of my machines upgraded properly to
> 6.7, they were mostly 6.4 or earlier.
>
> Went to try my Canon flatbed scanner and xsane would only work under root.
> Puzzled about that for a bit, did some googling and reading about
> belonging to groups like operator and _saned, but my main account still
> belonged to those groups so what else had changed. Root could see the
> device but I couldn't, even though I had my main account in wheel group.
>
> I looked at all the sub-devices the scanner could connect to and player
> with adding group privilege to then since they were in group wheel
>
> Never did quite understand all the implications of the USB structure,
> since been using OpenBSD so long that the earliest machines I put it on,
> didn't even have USB devices...
>
> But what had changed in the latest versions?
>
> I looked at usb1 which corresponds to one of the master usb controller
> levels. It had user root rw and wheel group r bits, and am thinking
> that a scanner is only a read device, right? Good enough, right?
>
> Nope! Dope! You have to be able to send commands to it as well to tell
> it when and how to scan.
>
> As root:
>
> chmod g+w /dev/usb1
>
> and lo and behold my main account could use the scanner again.
>
> I don't know if the subdevices needed the group permission changes
> too, but I had done that already. They didn't have privileges for wheel
> originally before I set them up in mass. Maybe I better revisit the
> question of what privileges subdevices should have in light of
> current security issues, if any.
>
> I guess, at some point in recent releases the makedev step stopped
> automatically allowing "write" for wheel on the usb1 device, for some good
> reason.
>
> Figured I put a success story up instead of a complaint, for a change,
> leaving a trail of enough key words that some one else might be able to
> google for it.

Wasn't /usr/local/share/doc/pkg-readmes/sane-backends enough to make it work
for you?

--
Antoine

No comments:

Post a Comment