Bug 214925 - udev ignores "MODE:="0666" in rules, sets to 0660 instead
udev ignores "MODE:="0666" in rules, sets to 0660 instead
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: udev (Show other bugs)
5
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Harald Hoyer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-09 19:01 EST by charlie redditt
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-11-10 05:17:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description charlie redditt 2006-11-09 19:01:33 EST
Description of problem:
I can chmod 0666 /dev/hdc (my dvdburner) but udev resets to 0660 at reboot.
I need mode 0666 on my burner device so regular users can use k3b

I can set it to mode 0666 as root, but it is not persistent.

I have added the following rule to /etc/udev/rules.d/50-udev.rules
KERNEL=="hdc", MODE:="0666"

and output of udevtest /block/hdc shows following line:
create_node: creating device node '/dev/hdc', major = '22', minor = '0', mode =
'0666', uid = '0', gid = '6'

Funny thing is, I can take my rule out and udevtest /block/hdc will show it
creating  /dev/hdc as mode 0640, when in reality it is ALWAYS 0660, not 0666 nor
0640

Version-Release number of selected component (if applicable):
 0.9.8.1

How reproducible:
add a udev rule to change permission of the device for my burner
restart udev, nothing changes

Or
chmod 666 burner
reboot, and it goes back to mode 660


Steps to Reproduce:
1. ls -l /dev/hdc # (or wherever dvdr is , should be mode 660 )
2. echo 'KERNEL=="hdc", MODE:="0666"' >> /etc/udev/rules.d/50-udev.rules
3. udevtest /block/hdc # make sure rule is okay, should show MODE = 0666
4. chmod 666 /dev/hdc #just for good measure, not necessary
5. ls -l /dev/hdc # will be mode 666 now
6. udevcontrol reload_rules
7. udevstart
  
Actual results:
ls -l /dev/hdc  # will be mode 660 after steps above 

Expected results:
ls -l /dev/hdc  # should be mode 666 after steps above 

Additional info:
This is just an annoyance, I need mode 666 for regular users to be able to use
k3b to burn cd's or dvd's
Comment 1 Harald Hoyer 2006-11-10 05:17:01 EST
 ":=" is wrong... "=" is correct

but... permissions are set by pam_console described in
/etc/security/console.perms.d/

The console user, who first logs on the console will own the device.. no need
for 0666
Comment 2 charlie redditt 2006-11-10 14:12:38 EST
from man 7 udev
 ":=     Assign a value to a key finally; disallow any later changes, 
     which may be used to prevent changes by any later rules."

lo and behold, yes, if I log in at the console, I own the drive and k3b works!

My trouble is that I almost always connect to my machine via VNC.  I suppose I
could login on a tty and leave it (rather than always running a local X server
that I'll never use).

I changed the <cdrom> line in 50-default.perm  to default to 0666 instead of
0660, and k3b works via VNC now, regardless of whether or not I'm logged in or not.

THANX!


Note You need to log in before you can comment on or make changes to this bug.