You are not logged in.
Pages: 1
I just upgraded my system which entailed udev-053. Now, udev does not seem to be picking up my 00.permissions files which contains:
hdc:root:optical:0660
sr0:root:optical:0660
My 00.rules file does seem to be working.
Anybody else having this problem?
Offline
Permissions and user/group ownership are no longer defined in separate files -- instead they are specified within the rules file itself. Look at /etc/udev/rules.d/udev.rules for examples.
This means that any custom permissions need to be moved into a rules file like /etc/udev/rules.d/udev.rules or /etc/udev/rules.d/00-my.rules.
In the news section of archlinux.org
Offline
Standard arch udev.rules already should set permissions for hdc and sr0 for optical group:
# permissions for IDE CD devices
BUS="ide", KERNEL="hd[a-z]", SYSFS{removable}="1", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom*", NAME="%k", GROUP="optical"
#permissions for SCSI CD devices
BUS="scsi", KERNEL="sr[0-9]*", SYSFS{type}="5", NAME="scd%n", GROUP="optical"
If it doesn't work for you maybe you should copy (and edit) these lines to your /etc/udev/rules.d/00.udev.rules
For example:
BUS="ide", KERNEL="hdc", SYSFS{removable}="1", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom*", NAME="%k", GROUP="optical", MODE="0660"
BUS="scsi", KERNEL="sr0", SYSFS{type}="5", NAME="scd%n", GROUP="optical", MODE="0660"
You can experiment with other options if needed (explanation of all fields is in udev manual).
Offline
Guess this means that I need some help because I tried to combine the two files into one
KERNEL="hdc", NAME="hdc", SYMLINK="cdrom"
KERNEL="hdd", NAME="hdd", SYMLINK="zip"
KERNEL="sr0", NAME="sr0", SYMLINK="cdw"
hdc:root:optical:0660
sr0:root:optical:0660
with no luck. The symlinks are created, but the permissions on the two cdrom devices are not changed. Order in the file does not seem to matter as well.
I was looking through /etc/udev/rules.d/udev.rules, it looks like the udev already tries to set "sr[0-9]" devices to a group of optical. Is this true?
Offline
Well, the permissions appear to be changed as I hoped:
[tim@dellmachine ~]$ ll /dev/hdc*
brw-rw---- 1 root optical 22, 0 2005-02-16 17:01 /dev/hdc
[tim@dellmachine ~]$ ll /dev/scd*
brw-rw---- 1 root optical 11, 0 2005-02-16 17:01 /dev/scd0
[tim@dellmachine ~]$
But now the symlinks are not being created. Here is my latest 00.rules file:
BUS="ide", KERNEL="hdc", SYSFS{removable}="1", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom", NAME="%k", GROUP="optical", MODE="0660"
BUS="scsi", KERNEL="sr0", SYSFS{type}="5", NAME="scd%n", GROUP="optical", MODE="0660"
BUS="ide", KERNEL="hdc", NAME="hdc", SYMLINK="cdrom"
BUS="ide", KERNEL="hdd", NAME="hdd", SYMLINK="zip"
BUS="scsi", KERNEL="scd0", NAME="scd0", SYMLINK="cdw"
Any suggestions? The code was from my old 00.rules file that just had symlinking commands.
Offline
did you look at the udev man pages or any other bit of udev info? I would assume that they deal with it.
See the udev 8 manpage for more information on writing rules.
AKA uknowme
I am not your friend
Offline
Yeah, to combine:
KERNEL="hdc", NAME="hdc", SYMLINK="cdrom"
hdc:root:optical:0660
you need to do it like so:
KERNEL="hdc", NAME="hdc", SYMLINK="cdrom", GROUP="optical", MODE="0660"
Offline
Yeah, to combine:
KERNEL="hdc", NAME="hdc", SYMLINK="cdrom" hdc:root:optical:0660
you need to do it like so:
KERNEL="hdc", NAME="hdc", SYMLINK="cdrom", GROUP="optical", MODE="0660"
This is it. You could easily figure it out
a) reading the current udev rule file
b) reading the man pages.
:?
Frumpus ♥ addict
[mu'.krum.pus], [frum.pus]
Offline
I'm sorry, but I've looked at the man pages and your little example here and I can't get mine to work...no sound...
Offline
what dou you mean - no sound?
Modules loaded?
Devices there?
Permissions OK?
Frumpus ♥ addict
[mu'.krum.pus], [frum.pus]
Offline
Make sure that the 00... file is in the rules.d directory, as the permissions.d one is no longer used.
Offline
I had to create the following file to get sound back in the new udev.
my /etc/udev/rules.d/00-my.rules
# misc
KERNEL="rtc", NAME="misc/%k", SYMLINK="%k", GROUP="users", MODE="0664"
# sound devices
# alsa devices
SUBSYSTEM="sound", GROUP="users"
KERNEL="controlC[0-9]*", NAME="snd/%k"
KERNEL="hw[CD0-9]*", NAME="snd/%k"
KERNEL="pcm[CD0-9cp]*", NAME="snd/%k"
KERNEL="midi[CD0-9]*", NAME="snd/%k"
KERNEL="timer", NAME="snd/%k"
KERNEL="seq", NAME="snd/%k"
# oss devices
KERNEL="audio*", NAME="sound/%k", SYMLINK="%k"
KERNEL="dmmidi", NAME="sound/%k", SYMLINK="%k"
KERNEL="dsp*", NAME="sound/%k", SYMLINK="%k"
KERNEL="midi*", NAME="sound/%k", SYMLINK="%k"
KERNEL="mixer*", NAME="sound/%k", SYMLINK="%k"
KERNEL="sequencer*", NAME="sound/%k", SYMLINK="%k"
Might work after trimming it down, but haven't tried.
It was created from the default /etc/udev/rules.d/udev.rules changing the "audio" group to "users".
:: / my web presence
Offline
IceRAM's solution worked. I had vastly over complicated the situation.
Thanks for your help!
Offline
colnago wrote:
Yeah, to combine:
KERNEL="hdc", NAME="hdc", SYMLINK="cdrom" hdc:root:optical:0660
you need to do it like so:
KERNEL="hdc", NAME="hdc", SYMLINK="cdrom", GROUP="optical", MODE="0660"
This is it. You could easily figure it out
a) reading the current udev rule file
b) reading the man pages.
Sorry, but this doesn't work for me. The links are not being created. The only link that gets created is when I load the ide-floppy driver.
Yes, I tried to read the man pages, but I had a hard time making sense of them especially before the upgrade, all was well. I am by no means a udev expert so that I why I posted to the forum in hopes that someone could point me to the errors in my ways. I had a few suggestions (Thanks), but none seem to be working.
Again here is my latest rendition. If someone could point me to the error in either the file, I would greatly appreciate it.
BUS="ide", KERNEL="hdc", SYSFS{removable}="1", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom", NAME="%k", GROUP="optical", MODE="0660"
BUS="scsi", KERNEL="sr0", SYSFS{type}="5", NAME="scd%n", GROUP="optical", MODE="0660"
KERNEL="hdc", NAME="hdc", SYMLINK="cdrom", GROUP="optical", MODE="0660"
KERNEL="hdd", NAME="hdd", SYMLINK="zip", GROUP="optical", MODE="0660"
KERNEL="scd0", NAME="scd0", SYMLINK="cdw", GROUP="optical", MODE="0660"
I have tried just having each of the symlink commands in the file without success.
Offline
I think there is a comma missing before NAME in this line from /etc/udev/rules.d/udev.rules:
# permissions for IDE floppy devices
BUS="ide", KERNEL="hd*", PROGRAM="/etc/udev/ide-floppy.sh %k", RESULT="1" NAME{all_partitions}="%k", GROUP="floppy"
Looks like a bug... I'll file a bug report.
Offline
Pages: 1