user defined udev rules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi,

I would like to change permissions of /dev/sda* and /dev/hda* files to 0644. I added the following rules to 99-udev.rules files:

KERNEL=="[hs]d*", OWNER="root" GROUP="disk", MODE="0644

 

After restarting udev by strat_udev, I checked that permissions were changed:

 

[root@gini rules.d]# ll /dev/sda*

brw-r--r-- 1 root disk 8, 0 Sep  2  2009 /dev/sda

brw-r--r-- 1 root disk 8, 1 Sep  2 13:55 /dev/sda1

brw-r--r-- 1 root disk 8, 2 Sep  2 13:55 /dev/sda2

brw-r--r-- 1 root disk 8, 3 Sep  2  2009 /dev/sda3

brw-r--r-- 1 root disk 8, 4 Sep  2  2009 /dev/sda4

brw-r--r-- 1 root disk 8, 5 Sep  2 13:55 /dev/sda5

 

But permissions of /dev/hda file were not changed. Moreover, the owner of this file is changed:

 

[root@gini rules.d]# ll /dev/hda*

brw------- 1 alexey-s disk 3, 0 Sep  2 13:55 /dev/hda

 

 

Looking into /var/log/messages:

Sep  2 16:26:53 gini udevd-event[29543]: udev_node_add: creating device node '/dev/hda', major = '3', minor = '0', mode = '0644', uid = '0', gid = '6'

Sep  2 16:26:53 gini udevd-event[29543]: udev_node_add: creating symlink '/dev/cdrom' to 'hda'

Sep  2 16:26:53 gini udevd-event[29543]: udev_node_add: creating symlink '/dev/cdrom-hda' to 'hda'

Sep  2 16:26:53 gini udevd-event[29543]: udev_node_add: creating symlink '/dev/dvd' to 'hda'

Sep  2 16:26:53 gini udevd-event[29543]: udev_node_add: creating symlink '/dev/dvd-hda' to 'hda'

Sep  2 16:26:53 gini udevd-event[29543]: udev_node_add: creating symlink '/dev/disk/by-path/pci-0000:02:00.0-ide-0:0' to '../../hda'

 

The problem: it's look like the udev rules file works fine, but permissions and owner of /dev/hda file are changed.

 

 

Thanks,

Alexey

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux