[wellylug] Scanner permissions
Centurion Computer Technology (2005) Ltd
daniel at centurion.net.nz
Tue Sep 16 16:07:01 NZST 2008
On Tue, 2008-09-16 at 10:04 +1200, Rob van der Linde wrote:
> Ok, this might work on Ubuntu desktop edition, however I am operating
> the scanner from Ubuntu server edition (no GUI or X), so there won't be
> HAL or DBUS.
Ok. But it's udev that sets the permissions and under debian, it would
still set the device group to scanner. HAL and DBUS don't have anything
to do with scanimage anyway as it is not a GUI application.
>
> The UDEV way sound right, I have always wanted to know how to work this.
> I also have a USB programmable card (k8055) (a kit from Jaycar I put
> together a while back) that has Linux support, including a Python
> library which is pretty cool, but I can also only operate this card as
> root.
>
> I am going to read the Gentoo howto that Alastair posted, as soon as I
> get back tonight.
>
> On Tue, 2008-09-16 at 07:32 +1200, Centurion Computer Technology (2005)
> Ltd wrote:
> > Hi Rob,
> >
> > I think you may have to add yourself to the scanner group. You should
> > be able to do this via the "users and group" utility under
> > System->Administration on the main menu or alternatively you could as
> > root or using sudo as I believe is the broken Ubuntu way do "sudo
> > adduser <your username> scanner".
> >
> > You will then have to log out and in so that HAL will recognise your new
> > found permissions.
> >
> >
> > On Mon, 2008-09-15 at 19:48 +1200, Jethro Carr wrote:
> > > On Mon, 2008-09-15 at 19:40 +1200, Rob van der Linde wrote:
> > > > I have a Canon USB scanner which is supported by Linux (I can run it no
> > > > problem on Ubuntu 8.04 desktop), that I want to get running on Ubuntu
> > > > 8.04 server. When I enter:
> > > >
> > > > scanimage -L
> > > >
> > > > Nothing shows, however:
> > > >
> > > > sudo scanimage -L
> > > >
> > > > Comes up with the following:
> > > >
> > > > device `plustek:libusb:002:003' is a Canon CanoScan N1240U/LiDE30
> > > > flatbed scanner
> > > >
> > > > I also ran sane-find-scanner which sees the scanner, it says you may
> > > > need to adjust the permissions for scanimage -L to see it. I think that
> > > > is is why it is only showing when I run that command as root.
> > > >
> > > > I want to be able to use the scanner as the user www-data, so I can run
> > > > Jethro's openpsfc software. Any ideas how I should do this?
> > >
> > > hi Rob,
> > >
> > > I believe it works with your GUI because HAL/GNOME/KDE does some funky
> > > stuff to give the user access to the scanner device.
> > >
> > > To make it work on a server, I tend to fix it by giving the scanimage
> > > command permissions to run as root when executed by any user. Eg:
> > > chmod +s /usr/bin/scanimage
> > >
> > > There are other ways too, such as setting up sudo access, but the chmod
> > > method is easiest.
> > >
> > > There may be a better way to give non-root users access to scanners, but
> > > I'm not aware of how. (if you know, please do enlighten me! :-)
> > >
> > > The problem is that usb scanners don't create device files, so you can't
> > > set permissions on them that way, it's all done using kernel APIs.
> > >
> > > regards,
> > > jethro
> > --
> > Daniel Reurich
> >
> > Centurion Computer Technology (2005) Limited.
> > Ph: 021 797 722
> >
> >
--
Daniel Reurich
Centurion Computer Technology (2005) Limited.
Ph: 021 797 722
More information about the wellylug
mailing list