[sane-devel] scanbd problem with dbus permission ?

Michael Markusch markuschmichael at gmx.de
Wed Aug 21 15:23:34 UTC 2013


Hi Wilhelm,

I figured out the problem: it's about the permissions. It seems to be
this issue:

http://sane.10972.n7.nabble.com/scanbd-works-but-not-buttons-td16867.html

- edit scanbd.conf user = root, group = root
- login as root, sudo su
- export SANE_CONFIG_DIR=/usr/local/etc/scanbd
- /usr/local/sbin/scanbd -d -f -c /usr/local/etc/scanbd/scanbd.conf

Now I see the debug output and the pressed buttons.

Thanks,
Michael

Am 20.08.2013 20:54, schrieb Wilhelm:
> Am 20.08.2013 18:17, schrieb Michael Markusch:
>> Hi Wilhelm,
>>
>> thanks for your answer.
>>
>> I followed your notes but it still does not work.
>
> sad but true ;-)
>
> Looks like scanbd uses the wrong dll.conf, did you
> export SANE_CONFIG_DIR=/usr/local/etc/scanbd ?
>
> please show your configs:
>
> /etc/sane/dll.conf
> /usr/local/sbin/scanbd/dll.conf
> /usr/local/etc/scanbd/scanbd.conf
>
> and show the env-vars for the user starting the scanbd (root).
>
>>
>> - make distclean
>> - ./configure
>> - make
>> - set in /usr/local/sbin/scanbd/dll.confonly "genesys"
>> - sudo /usr/local/sbin/scanbd -d -f -c /usr/local/etc/scanbd/scanbd.conf
>>
>>> /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: Running as effective gid 7
>>> /usr/local/sbin/scanbd: drop privileges to uid: 112
>>> /usr/local/sbin/scanbd: Running as effective uid 112
>>> /usr/local/sbin/scanbd: dbus_init
>>> /usr/local/sbin/scanbd: dbus match
>>> type='signal',interface='org.freedesktop.Hal.Manager'
>>> /usr/local/sbin/scanbd: sane version 1.0
>>> /usr/local/sbin/scanbd: Scanning for local-only devices
>>> /usr/local/sbin/scanbd: start_sane_threads
>>> /usr/local/sbin/scanbd: start dbus thread
>>> /usr/local/sbin/scanbd: udev init
>>> /usr/local/sbin/scanbd: get udev monitor
>>> /usr/local/sbin/scanbd: timeout: 500 ms
>>> /usr/local/sbin/scanbd: udev fd is non-blocking, now setting to
>>> blocking mode
>>> /usr/local/sbin/scanbd: Iteration on dbus call
>>> /usr/local/sbin/scanbd: start udev thread
>>> /usr/local/sbin/scanbd: udev thread started
>>> /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
>>> ...
>>
>> What else can I try?
>>
>> Thanks,
>> Michael
>>
>>
>> Am 20.08.2013 07:50, schrieb Wilhelm:
>>> 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.
>>>
>>>
>>
>
>




More information about the sane-devel mailing list