Bug 170981

Summary: Permissions/group are not set if SYMLINK is used
Product: [Fedora] Fedora Reporter: Peter Bieringer <pb>
Component: udevAssignee: Harald Hoyer <harald>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-17 05:14:24 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Peter Bieringer 2005-10-16 17:17:51 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7

Description of problem:
During enabling a scanner for use by normal users (e.g. by xsane) I found a strange problem in udev:

According to
http://www.reactivated.net/writing_udev_rules.html

I've setup:
# cat /etc/udev/rules.d/10-scanner.rules
# There are a number of modifiers that are allowed to be used in some of the
# fields.  See the udev man page for a full description of them.
#
# default is OWNER="root" GROUP="root", MODE="0600"
#

# SCSI scanner
KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{vendor}=="EPSON", SYSFS{model}=="SCANNER GT-7000", SYMLINK="scanner%n", GROUP="users", MODE="0660"


Version-Release number of selected component (if applicable):
udev-058-1.0.FC4.1

How reproducible:
Always

Steps to Reproduce:
1. Get SCSI scanner
2. Create
# cat /etc/udev/rules.d/10-scanner.rules
# There are a number of modifiers that are allowed to be used in some of the
# fields.  See the udev man page for a full description of them.
#
# default is OWNER="root" GROUP="root", MODE="0600"
#

# SCSI scanner
KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{vendor}=="EPSON", SYSFS{model}=="SCANNER GT-7000", SYMLINK="scanner%n", GROUP="users", MODE="0660"


Actual Results:  /dev/sg1 (here) got permissions 0600 and root:root

Expected Results:  mode 0660 and root:users

Additional info:

I've tried more:

BUS=="scsi", SYSFS{vendor}=="EPSON", SYSFS{model}=="SCANNER GT-7000", SYMLINK="scanner_epson", GROUP="users", MODE="0660"
-> same issue

BUS=="scsi", SYSFS{vendor}=="EPSON", SYSFS{model}=="SCANNER GT-7000", SYMLINK="scanner_epson", GROUP="users"
-> same issue

KERNEL=="sg[0-9]*", BUS=="scsi", SYSFS{vendor}=="EPSON", SYSFS{model}=="SCANNER GT-7000", GROUP="users", MODE="0660"
-> like expected, but no symlink

Looks like if SYMLINK is specified, MODE is reset to 0600 and GROUP is not working. That's strange, because example in given URL
KERNEL="fb[0-9]*", NAME="fb/%n", SYMLINK="%k", GROUP="video"
describe that this should work...
Comment 1 Harald Hoyer 2005-10-17 05:14:24 EDT
this is pam_console setting the permissions... edit
/etc/security/console.perms.d/50-default.perms or create a new file overriding
the default perms