udev.rules can't set group or mode?
Hi Folks,
I don't seem to be able to set the mode or group for '/dev/ttyUSB1'
Following Daniel Drake's howto here:
http://www.reactivated.net/writing_udev_rules.html
Without the rule:
'/dev/ttyUSB1' has group=uucp and mode=0660.
With the rule (DRIVER="ark3116", NAME="nokiaca42clone", SYMLINK="ttyUSB%n", GROUP="uucp", MODE="0666"):
'/dev/nokiaca42clone' and '/dev/ttyUSB1' (a symlink) get made OK, but with group=root and mode=0600 (not 'uucp' and '0666').
Here's output of udevtest:
[morgan@morgansmachine ~]$ udevtest /class/tty/ttyUSB1
main: looking at device '/class/tty/ttyUSB1' from subsystem 'tty'udev_rules_get_name: reset symlink listudev_rules_get_name: add symlink 'ttyUSB1'udev_rules_get_name: rule applied, 'ttyUSB1' becomes 'nokiaca42clone'create_node: creating device node '/dev/nokiaca42clone', major = '188', minor = '1', mode = '0600', uid = '0', gid = '0'create_node: creating symlink '/dev/ttyUSB1' to 'nokiaca42clone'
main: run: 'socket:/org/kernel/udev/monitor'
main: run: '/lib/udev/udev_run_devd'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/sbin/pam_console_apply /dev/nokiaca42clone /dev/ttyUSB1' [morgan@morgansmachine ~]$
Any ideas? Any help much appreciated.
Regards,
Morgan.
Signature · 6 lines
Morgan Read NEW ZEALAND <mailto:mstuffATreadDOTorgDOTnz> fedora: Freedom Forever! http://fedoraproject.org/wiki/Overview
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 13 lines · Morgan Read
I don't seem to be able to set the mode or group for '
/dev/ttyUSB1'Following Daniel Drake's howto here:
http://www.reactivated.net/writing_udev_rules.htmlWithout the rule:
'/dev/ttyUSB1' has group=uucp and mode60.With the rule (DRIVER="ark3116", NAME="nokiaca42clone", SYMLINK="ttyUSB%n", GROUP="uucp", MODE="0666"):
'/dev/nokiaca42clone' and '/dev/ttyUSB1' (a symlink) get made OK, but with group=root and mode00 (not 'uucp' and '0666').
Quoted 13 lines
Here's output of udevtest:
[morgan@morgansmachine ~]$ udevtest /class/tty/ttyUSB1
main: looking at device '/class/tty/ttyUSB1' from subsystem 'tty'udev_rules_get_name: reset symlink listudev_rules_get_name: add symlink 'ttyUSB1'udev_rules_get_name: rule applied, 'ttyUSB1' becomes 'nokiaca42clone'create_node: creating device node '/dev/nokiaca42clone', major = '188', minor = '1', mode = '0600', uid = '0', gid = '0'create_node: creating symlink '/dev/ttyUSB1' to 'nokiaca42clone'
main: run: 'socket:/org/kernel/udev/monitor'
main: run: '/lib/udev/udev_run_devd'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/sbin/pam_console_apply/dev/nokiaca42clone/dev/ttyUSB1
A similar rule works for me. What version of udev is that?
Why do you rename the device instead of creating just a link?
And better use "+=" for symlinks, and '=' for compares like DRIVER, '"' assignes values.
Kay
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 28 lines · Kay Sievers
Quoted 13 lines · Morgan Read
I don't seem to be able to set the mode or group for '
/dev/ttyUSB1'Following Daniel Drake's howto here:
http://www.reactivated.net/writing_udev_rules.htmlWithout the rule:
'/dev/ttyUSB1' has group=uucp and mode=0660.With the rule (DRIVER="ark3116", NAME="nokiaca42clone", SYMLINK="ttyUSB%n", GROUP="uucp", MODE="0666"):
'/dev/nokiaca42clone' and '/dev/ttyUSB1' (a symlink) get made OK, but with group=root and mode=0600 (not 'uucp' and '0666').Quoted 13 lines
Here's output of udevtest:
[morgan@morgansmachine ~]$ udevtest /class/tty/ttyUSB1
main: looking at device '/class/tty/ttyUSB1' from subsystem 'tty'udev_rules_get_name: reset symlink listudev_rules_get_name: add symlink 'ttyUSB1'udev_rules_get_name: rule applied, 'ttyUSB1' becomes 'nokiaca42clone'create_node: creating device node '/dev/nokiaca42clone', major = '188', minor = '1', mode = '0600', uid = '0', gid = '0'create_node: creating symlink '/dev/ttyUSB1' to 'nokiaca42clone'
main: run: 'socket:/org/kernel/udev/monitor'
main: run: '/lib/udev/udev_run_devd'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/sbin/pam_console_apply/dev/nokiaca42clone/dev/ttyUSB1
Quoted 6 lines
A similar rule works for me. What version of udev is that?
Why do you rename the device instead of creating just a link?
And better use "+=" for symlinks, and '==' for compares like DRIVER, '"' assignes values.
Hello Kay, thanks:
[morgan@morgansmachine ~]$ rpm -q udev
udev-084-13
Changed rule to:
DRIVER=="ark3116", SYMLINK+="nokiaca42clone", MODE="0666" (Was following the 0.6 version of
http://www.reactivated.net/writing_udev_rules.html.)
Now the device files have the correct group and owner, but mode wont change? With the new rule mode is 0660?
Regards,
M.
Signature · 6 lines
Morgan Read NEW ZEALAND <mailto:mstuffATreadDOTorgDOTnz> fedora: Freedom Forever! http://fedoraproject.org/wiki/Overview
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 38 lines · Morgan Read
Quoted 28 lines · Kay Sievers
Quoted 13 lines · Morgan Read
I don't seem to be able to set the mode or group for '
/dev/ttyUSB1'Following Daniel Drake's howto here:
http://www.reactivated.net/writing_udev_rules.htmlWithout the rule:
'/dev/ttyUSB1' has group=uucp and mode60.With the rule (DRIVER="ark3116", NAME="nokiaca42clone", SYMLINK="ttyUSB%n", GROUP="uucp", MODE="0666"):
'/dev/nokiaca42clone' and '/dev/ttyUSB1' (a symlink) get made OK, but with group=root and mode00 (not 'uucp' and '0666').Quoted 13 lines
Here's output of udevtest:
[morgan@morgansmachine ~]$ udevtest /class/tty/ttyUSB1
main: looking at device '/class/tty/ttyUSB1' from subsystem 'tty'udev_rules_get_name: reset symlink listudev_rules_get_name: add symlink 'ttyUSB1'udev_rules_get_name: rule applied, 'ttyUSB1' becomes 'nokiaca42clone'create_node: creating device node '/dev/nokiaca42clone', major = '188', minor = '1', mode = '0600', uid = '0', gid = '0'create_node: creating symlink '/dev/ttyUSB1' to 'nokiaca42clone'
main: run: 'socket:/org/kernel/udev/monitor'
main: run: '/lib/udev/udev_run_devd'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/sbin/pam_console_apply/dev/nokiaca42clone/dev/ttyUSB1Quoted 6 lines
A similar rule works for me. What version of udev is that?
Why do you rename the device instead of creating just a link?
And better use "+=" for symlinks, and '=' for compares like DRIVER, '"' assignes values.
Hello Kay, thanks:
Quoted 7 lines
[morgan@morgansmachine ~]$ rpm -q udev
udev-084-13Changed rule to:
DRIVER="ark3116", SYMLINK+="nokiaca42clone", MODE="0666" (Was following the 0.6 version of
http://www.reactivated.net/writing_udev_rules.html.)
Right, that should probably be mentioned, that we don't recommend changing 'default' names, except to make them match the 'default', like moving the input devices in a subdirectory where they have always lived, long before udev.
Better create only symlinks, and nothing else will break by making (silly) assumptions about /dev.
Quoted 2 lines
Now the device files have the correct group and owner, but mode wont change? With the new rule mode is 0660?
That may be Fedora's pam_console, that comes into your way and changes it back. Look at udevtest again to see what udev is doing.
Kay
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · Kay Sievers
Quoted 2 lines · Morgan Read
Quoted 1 line · Kay Sievers
On Fri, 2006-07-28 at 16:25 +1200, Morgan Read wrote:
...
Quoted 13 lines
Quoted 7 lines
[morgan@morgansmachine ~]$ rpm -q udev
udev-084-13Changed rule to:
DRIVER=="ark3116", SYMLINK+="nokiaca42clone", MODE="0666" (Was following the 0.6 version of
http://www.reactivated.net/writing_udev_rules.html.)Right, that should probably be mentioned, that we don't recommend changing 'default' names, except to make them match the 'default', like moving the input devices in a subdirectory where they have always lived, long before udev.
Quoted 8 lines
Better create only symlinks, and nothing else will break by making (silly) assumptions about /dev.
Quoted 2 lines
Now the device files have the correct group and owner, but mode wont change? With the new rule mode is 0660?
That may be Fedora's
pam_console, that comes into your way and changes it back. Look at udevtest again to see what udev is doing.
Hmm, but according to udevtest (below), pam is the last thing to run? And, l 4 of udevtest says it's creating "mode = '0660'", which ain't right? If the problem is pam_console, how would I deal to it?
M.
[morgan@morgansmachine ~]$ udevtest /class/tty/ttyUSB1
main: looking at device '/class/tty/ttyUSB1' from subsystem 'tty'udev_rules_get_name: add symlink 'nokiaca42clone'udev_rules_get_name: rule applied, 'ttyUSB1' becomes 'ttyUSB1'create_node: creating device node '/dev/ttyUSB1', major = '188', minor = '1', mode = '0660', uid = '0', gid = '14'create_node: creating symlink '/dev/nokiaca42clone' to 'ttyUSB1'
main: run: 'socket:/org/kernel/udev/monitor'
main: run: '/lib/udev/udev_run_devd'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/sbin/pam_console_apply /dev/ttyUSB1 /dev/nokiaca42clone' [morgan@morgansmachine ~]$
Signature · 6 lines
Morgan Read NEW ZEALAND <mailto:mstuffATreadDOTorgDOTnz> fedora: Freedom Forever! http://fedoraproject.org/wiki/Overview
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 24 lines · Morgan Read
Quoted 3 lines · Kay Sievers
Quoted 2 lines · Morgan Read
Quoted 1 line · Kay Sievers
On Fri, 2006-07-28 at 16:25 +1200, Morgan Read wrote:
...
Quoted 19 lines
Quoted 7 lines
[morgan@morgansmachine ~]$ rpm -q udev
udev-084-13Changed rule to:
DRIVER="ark3116", SYMLINK+="nokiaca42clone", MODE="0666" (Was following the 0.6 version of
http://www.reactivated.net/writing_udev_rules.html.)Right, that should probably be mentioned, that we don't recommend changing 'default' names, except to make them match the 'default', like moving the input devices in a subdirectory where they have always lived, long before udev.
Better create only symlinks, and nothing else will break by making (silly) assumptions about /dev.
Quoted 2 lines
Now the device files have the correct group and owner, but mode wont change? With the new rule mode is 0660?
Quoted 7 lines
Quoted 2 lines
That may be Fedora's
pam_console, that comes into your way and changes it back. Look at udevtest again to see what udev is doing.Hmm, but according to udevtest (below), pam is the last thing to run? And, l 4 of udevtest says it's creating "mode = '0660'", which ain't right? If the problem is
pam_console, how would I deal to it? '1', mode = '0660', uid = '0', gid = '14'
No, it's not pam_console, udevd creates the device with 0660. Eigther your rule format is wrong, or some later rule matches too and overwrites the previous mode.
Kay
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 25 lines · Kay Sievers
Quoted 24 lines · Morgan Read
Quoted 3 lines · Kay Sievers
Quoted 2 lines · Morgan Read
Quoted 1 line · Kay Sievers
On Fri, 2006-07-28 at 16:25 +1200, Morgan Read wrote:
...
Quoted 19 lines
Quoted 7 lines
[morgan@morgansmachine ~]$ rpm -q udev
udev-084-13Changed rule to:
DRIVER=="ark3116", SYMLINK+="nokiaca42clone", MODE="0666" (Was following the 0.6 version of
http://www.reactivated.net/writing_udev_rules.html.)Right, that should probably be mentioned, that we don't recommend changing 'default' names, except to make them match the 'default', like moving the input devices in a subdirectory where they have always lived, long before udev.
Better create only symlinks, and nothing else will break by making (silly) assumptions about /dev.
Quoted 2 lines
Now the device files have the correct group and owner, but mode wont change? With the new rule mode is 0660?
That may be Fedora's
pam_console, that comes into your way and changes it back. Look at udevtest again to see what udev is doing.
Quoted 8 lines
Quoted 4 lines
Hmm, but according to udevtest (below), pam is the last thing to run? And, l 4 of udevtest says it's creating "mode = '0660'", which ain't right? If the problem is
pam_console, how would I deal to it? '1', mode = '0660', uid = '0', gid = '14'No, it's not
pam_console, udevd creates the device with 0660. Eigther your rule format is wrong, or some later rule matches too and overwrites the previous mode.
Hi Kay,
Many thanks - changed name from 10-local.rules to z-local.rules. Now works fine. But, I understood that correct protocol was to name custom rules to run before defaults - any risks in my new naming scheme? M.
Signature · 6 lines
Morgan Read NEW ZEALAND <mailto:mstuffATreadDOTorgDOTnz> fedora: Freedom Forever! http://fedoraproject.org/wiki/Overview
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 9 lines · Morgan Read
Kay Sievers wrote:>
Quoted 3 lines
No, it's not
pam_console, udevd creates the device with 0660. Eigther your rule format is wrong, or some later rule matches too and overwrites the previous mode.Hi Kay,
Many thanks - changed name from 10-local.rules to z-local.rules. Now works fine. But, I understood that correct protocol was to name custom rules to run before defaults - any risks in my new naming scheme?
That should be fine.
Kay
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel