Hi guys, i'm facing a strange issue with a new arch installation.
Usb printers aren't recognized by cups unless i give the device file (/dev/bus/usb/something/something) property to the user "daemon".
I wrote an udev rule to do that everytime the printer is connected, and now it works, but i'm still curious to understand why it happens.
By default, the device file is created by udev, owned by root and with group lp with "correct" read and write permissions, and since the "daemon" user is in the lp group, i'd expect it to work, but it is not.
#grep daemon /etc/passwd /etc/group /etc/passwd:daemon:x:2:2:daemon:/sbin:/bin/false #<-- user daemon exists /etc/passwd:git:x:999:999:git daemon user:/:/bin/bash /etc/group:bin:x:1:root,bin,daemon /etc/group:daemon:x:2:root,bin,daemon /etc/group:adm:x:4:root,daemon /etc/group:lp:x:7:daemon #<-- user daemon is in the lp group!
It seems that when "daemon" try to access the device file, it is denied, unless it is in the lp group which, in turn, has read and write access to the device file.
Is there some test i can do to investigate the issue deeper?
Thanks for reading.
Last edited by kokoko3k (2014-04-17 13:34:25)
Well, Arch is not Ubutu-based => you will have to work little bit harder to get things working the way you want here......
Strange... Did you logout/login since you added daemon to the lp group? Can you show us the permissions on the file (the line you get when running ls -l /dev/bus/usb/something/something (after having deactivated the udev rule)).
Sorry for the late reply,
Yes i did logout and reboot the machine several times during my tries.
Device file permissions are "crw-rw-r-- 1 root lp" without the rule
and becomes "crw-rw-r-- 1 daemon lp" after applying it.
Last edited by kokoko3k (2014-04-28 06:27:53)
breaking down the output :
c : character device
owner : rw-
other : r--
Links : 1
the permissions for owner and group members are the same at filesystem-level .
that indicates another mechanism then file permissions causes this.
My guess was capabilities https://wiki.archlinux.org/index.php/Capabilities , but they only seem to apply to regular files, not devices.
Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them