[sane-devel] scanbd problem with dbus permission ?
Wilhelm
wilhelm.meier at fh-kl.de
Tue Aug 20 05:50:04 UTC 2013
Hi Michael,
Am 18.08.2013 14:33, schrieb Michael Markusch:
> Hi,
>
> I tried to install scanbd and I guess that's very easy, but now I have a
> permission problem. In the past I use my scanner with sane as scanserver
> and everything worked.
>
> My system:
> Debian Wheezy, Kernel 3.6.11 on Raspberry Pi
>
> Scanner:
> Canon canoscan lide 35
>
>
> Here my installation steps:
>
> - install libconfuse-dev libsane-dev libudev-dev libusb-dev
> - I use scanbd from SVN
> - ./configure --enable-scanbuttond (no problems)
why did you enable scanbuttond-drivers. Your scanner should be fully
supported by the sane-backends (and as you said, scanimage is working)
> - make (no problems)
> - make install (no problems)
> - copy scanbd_dbus.conf to /etc/dbus-1/system.d/
> - install xinetd
> - generate /etc/xinetd.d/sane-port
> - edit /etc/sane.d/dll.conf set only "net"
> - edit /usr/local/etc/scanbd/dll.conf set "#net"
be sure to include the backend for your scanner
> - edit /etc/sane.d/net.conf set localhost and connect_timeout = 60
> - copy backends /etc/sane.d/ to /usr/local/etc/scanbd/
> - export SANE_CONFIG_DIR=/usr/local/etc/scanbd
> - /usr/local/sbin/scanbd -d -f -c /usr/local/etc/scanbd/scanbd.conf
> (with problems)
>
> Log:
>
>> /usr/local/sbin/scanbd: debug on: level: 7
>> /usr/local/sbin/scanbd: dropping privs to uid saned
>> /usr/local/sbin/scanbd: dropping privs to gid lp
>> /usr/local/sbin/scanbd: drop privileges to gid: 7
>> /usr/local/sbin/scanbd: Can't set the effective gid to 7
>> /usr/local/sbin/scanbd: drop privileges to uid: 112
>> /usr/local/sbin/scanbd: Can't set the effective uid to 112
If you start scanbd as unprivileged user it isn't possible to changed
the euid/egid. Start it as root and it will itself change the euid /
egid to the ones in the config file.
>> /usr/local/sbin/scanbd: dbus_init
>> /usr/local/sbin/scanbd: dbus match
>> type='signal',interface='org.freedesktop.Hal.Manager'
>> /usr/local/sbin/scanbd: Loading
>> /usr/local/lib/scanbd/scanbuttond/backends/meta.so
>> /usr/local/sbin/scanbd: meta-backend: init
>> /usr/local/sbin/scanbd: libusbi: initializing...
>> /usr/local/sbin/scanbd: Loading
>> /usr/local/lib/scanbd/scanbuttond/backends/hp3500.so
>> /usr/local/sbin/scanbd: meta-backend: attaching backend: HP3500 USB
>> /usr/local/sbin/scanbd: hp3500-backend: init
>> /usr/local/sbin/scanbd: Loading
>> /usr/local/lib/scanbd/scanbuttond/backends/snapscan.so
>> /usr/local/sbin/scanbd: meta-backend: attaching backend: Snapscan USB
>> /usr/local/sbin/scanbd: snapscan-backend: init
>> /usr/local/sbin/scanbd: Loading
>> /usr/local/lib/scanbd/scanbuttond/backends/niash.so
>> /usr/local/sbin/scanbd: meta-backend: attaching backend: Niash USB
>> /usr/local/sbin/scanbd: niash-backend: init
>> /usr/local/sbin/scanbd: Loading
>> /usr/local/lib/scanbd/scanbuttond/backends/epson_vphoto.so
>> /usr/local/sbin/scanbd: meta-backend: attaching backend: Epson VX00
>> Photo USB
>> /usr/local/sbin/scanbd: epson-vphoto-backend: init
>> /usr/local/sbin/scanbd: Scanning for local-only devices
>> /usr/local/sbin/scanbd: Can't get the scbtn device list
your scanner isn't recognized by the old scanbuttond-backends. As said
above please use the sane-backends
>> /usr/local/sbin/scanbd: device list null
>> /usr/local/sbin/scanbd: start_scbtn_threads
>> /usr/local/sbin/scanbd: start the threads (0)
>> /usr/local/sbin/scanbd: start dbus thread
>> /usr/local/sbin/scanbd: Not Primary Owner (-1)
>> /usr/local/sbin/scanbd: Name Error (Connection ":1.48" is not allowed
>> to own the service "de.kmux.scanbd.server" due to security policies in
>> the configuration file)
>
> If I started scanbd as "sudo":
>
> Log:
>
>> ...
>> /usr/local/sbin/scanbd: meta-backend: attaching backend: Epson VX00
>> Photo USB
>> /usr/local/sbin/scanbd: epson-vphoto-backend: init
>> /usr/local/sbin/scanbd: Scanning for local-only devices
>> /usr/local/sbin/scanbd: Can't get the scbtn device list
>> /usr/local/sbin/scanbd: device list null
>> /usr/local/sbin/scanbd: start_scbtn_threads
>> /usr/local/sbin/scanbd: start the threads (0)
>> /usr/local/sbin/scanbd: start dbus thread
>> /usr/local/sbin/scanbd: timeout: 500 ms
>> /usr/local/sbin/scanbd: Iteration on dbus call
>> /usr/local/sbin/scanbd: Iteration on dbus call
>> /usr/local/sbin/scanbd: Iteration on dbus call
>> /usr/local/sbin/scanbd: Iteration on dbus call
>> /usr/local/sbin/scanbd: Iteration on dbus call
>> /usr/local/sbin/scanbd: Iteration on dbus call
>
> I tried also too:
>
> - SANE_CONFIG_DIR=/usr/local/etc/scanbd scanimage -L (with problems)
> - copy 99-saned.rules to /lib/udev/rules.d
> - udevadm trigger
> - SANE_CONFIG_DIR=/usr/local/etc/scanbd scanimage -L (with problems)
> - sudo SANE_CONFIG_DIR=/usr/local/etc/scanbd scanimage -L (no problems)
>
>
> I'm not familiar with dbus and so on... Can someone help me please?
Please do:
make distclean
./configure
make
and install it as above.
Then redo your tests.
--
Wilhelm
w.meier at unix.net
More information about the sane-devel
mailing list