[CentOS] Custom udev rules to override defaults?

Tue Jul 14 16:52:24 UTC 2009
James Pearson <james-p at moving-picture.com>

I'm trying to work out how to set up a custom udev rule to override 
permissions on serial ports (/dev/ttyS* and /dev/ttyUSB*) on CentOS 5.3

The default rule, in /etc/udev/rules.d/50-udev.rules has the line:

KERNEL=="tty[A-Z]*",            NAME="%k", GROUP="uucp", MODE="0660"

and I would like the mode to be 0666

Various docs on web say that you shouldn't change 50-udev.rules, but 
instead create a new rule file that appears lexically before that rule - 
so I've created a file that contains the line:

KERNEL=="tty[A-Z]*",            NAME="%k", GROUP="uucp", MODE="0666"

called 10-local.rules

However, this doesn't work ... the /dev/ttyS* device files get the 
'default' owner/group/perms (mode = '0600', uid = '0', gid = '0')

If I rename the 10-local.rules to say 99-local.rules, then the device 
files get the owner/group/perms from 50-udev.rules (mode = '0660', uid = 
'0', gid = '14')

I can get the mode set to 0666 by editing 50-udev.rules, however this 
seems wrong as you should be able to override the defaults without doing 
this.

Anyone know if this is possible?

Thanks

James Pearson