Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB scanner permissions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
broli
n00b
n00b


Joined: 12 Apr 2013
Posts: 26

PostPosted: Fri Aug 09, 2013 5:18 am    Post subject: USB scanner permissions Reply with quote

i have an hp scanner/printer.

the short explanation, as user it dosnt work. as root it does.

the more complex explanation
i have instaled hplip, xsane and gimp. lsusb shows the scanner. cupsd is running (and in the default runlevel)
running xsane as root, it works. the same with "scanimage -L"
my normal user is part of the scanner group (and usb group).
my kernel was generated by genkernel (im on amd64 desktop profile)

i have tried google, but all posts are old. talking about udev or scripts to chmod /proc ....or installing hotplug

and im completely lost. where do i look? what do i check ? XD
all help is much appreciated.
Back to top
View user's profile Send private message
SamuliSuominen
Retired Dev
Retired Dev


Joined: 30 Sep 2005
Posts: 2133
Location: Finland

PostPosted: Fri Aug 09, 2013 7:37 am    Post subject: Reply with quote

If you use ConsoleKit or systemd-logind and your user is detected as a local user, the ACLs should set the permissions for you:

Code:

$ ck-list-sessions
Session1:
   unix-user = '1000'
   realname = '(null)'
   seat = 'Seat1'
   session-type = ''
   active = FALSE
   x11-display = ''
   x11-display-device = ''
   display-device = '/dev/tty1'
   remote-host-name = ''
   is-local = TRUE
   on-since = '2013-08-04T20:38:59.202209Z'
   login-session-id = '2'
   idle-since-hint = '2013-08-04T23:38:16.014794Z'
Session2:
   unix-user = '1000'
   realname = '(null)'
   seat = 'Seat1'
   session-type = ''
   active = TRUE                                          <- THIS HERE is the most important bit, that makes you an active local user to get the permissions from ACLs
   x11-display = ':0'
   x11-display-device = '/dev/tty7'
   display-device = '/dev/tty1'
   remote-host-name = ''
   is-local = TRUE
   on-since = '2013-08-04T20:40:29.516195Z'
   login-session-id = '2'


But of course it should work by group too, as you pointed out. What version of sys-apps/kmod and sys-fs/udev do you have installed?

And can you provide the output from the following command too?

Code:

$ cat /lib/modules/$(uname -r)/modules.devname
Back to top
View user's profile Send private message
broli
n00b
n00b


Joined: 12 Apr 2013
Posts: 26

PostPosted: Fri Aug 09, 2013 8:06 am    Post subject: Reply with quote

consolekit says im a local user (wich is true)

Code:
carlos@Opteron ~ $  ck-list-sessions
Session1:
   unix-user = '1000'
   realname = '(null)'
   seat = 'Seat1'
   session-type = 'x11'
   active = TRUE
   x11-display = ':0.0'
   x11-display-device = '/dev/tty7'
   display-device = ''
   remote-host-name = ''
   is-local = TRUE
   on-since = '2013-08-09T04:58:03.786818Z'
   login-session-id = '3'


there are the versions of the packaes you asked
Code:

Opteron ~ # eix sys-apps/kmod
[I] sys-apps/kmod
     Available versions:  13-r1^t ~14-r1^t **9999^t {{debug doc kernel_linux lzma +openrc static-libs +tools zlib}}
     Installed versions:  13-r1^t(02:30:51 07/11/13)(kernel_linux tools zlib -debug -doc -lzma -static-libs)
     Homepage:            http://git.kernel.org/?p=utils/kernel/kmod/kmod.git
     Description:         library and tools for managing linux kernel modules

Opteron ~ # eix  sys-fs/udev
[I] sys-fs/udev
     Available versions:  204^t ~206^t [M]~206-r1^t [M]**9999^t {{abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_x86_32 abi_x86_64 abi_x86_x32 acl doc +firmware-loader gudev hwdb introspection keymap +kmod +openrc selinux static-libs}}
     Installed versions:  204^t(19:34:24 07/23/13)(acl firmware-loader gudev hwdb introspection keymap kmod openrc -doc -selinux -static-libs)
     Homepage:            http://www.freedesktop.org/wiki/Software/systemd
     Description:         Linux dynamic and persistent device naming support (aka userspace devfs)

[I] sys-fs/udev-init-scripts
     Available versions:  26^t **9999^t
     Installed versions:  26^t(03:07:08 07/11/13)
     Homepage:            http://www.gentoo.org
     Description:         udev startup scripts for openrc

Found 2 matches.


and this is the contents of the file you asked (i dont know why is relevant)
Code:
Opteron ~ # cat /lib/modules/$(uname -r)/modules.devname
# Device nodes to trigger on-demand module loading.
microcode cpu/microcode c10:184
fuse fuse c10:229
tun net/tun c10:200
ppp_generic ppp c108:0
dm_mod mapper/control c10:236
snd_timer snd/timer c116:33
snd_seq snd/seq c116:1


the device is identified correctly, and works as root, so everything is ok except "permissions" (this is an assumption)

i tried looking in /var/log/ for some reason and i cant find any.
not in Consolekit logs, or in Cups log. on the contrary, cups has logs of my user discovering printers (i have no idea what im doing at this point, but the log "feels" like its saying "yes, carlos found a device" )
Code:
localhost - carlos [09/Aug/2013:02:07:43 -0300] "POST / HTTP/1.1" 403 144 CUPS-Get-Devices successful-ok


did a "tail -f *" inside /var/log/cups and executed the sane fronted and at the same time i got the gui error, it showed this
Code:
==> access_log <==
localhost - - [09/Aug/2013:05:04:03 -0300] "POST / HTTP/1.1" 401 144 CUPS-Get-Devices successful-ok

==> error_log <==
E [09/Aug/2013:05:04:03 -0300] Returning HTTP Forbidden for CUPS-Get-Devices (no URI) from localhost

==> access_log <==
localhost - carlos [09/Aug/2013:05:04:03 -0300] "POST / HTTP/1.1" 403 144 CUPS-Get-Devices successful-ok

no idea if its important. im completly lost. shooting in the dark XD
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum