Bug 214925 - udev ignores "MODE:="0666" in rules, sets to 0660 instead
Summary: udev ignores "MODE:="0666" in rules, sets to 0660 instead
Alias: None
Product: Fedora
Classification: Fedora
Component: udev   
(Show other bugs)
Version: 5
Hardware: i386 Linux
Target Milestone: ---
Assignee: Harald Hoyer
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2006-11-10 00:01 UTC by charlie redditt
Modified: 2007-11-30 22:11 UTC (History)
0 users

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

Attachments (Terms of Use)

Description charlie redditt 2006-11-10 00:01:33 UTC
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

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

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

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 10:17:01 UTC
 ":=" is wrong... "=" is correct

but... permissions are set by pam_console described in

The console user, who first logs on the console will own the device.. no need
for 0666

Comment 2 charlie redditt 2006-11-10 19:12:38 UTC
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.


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