You are not logged in.

#1 2005-02-17 01:26:04

dekernel
Member
From: Vassar, MI USA
Registered: 2004-03-22
Posts: 117

udev and 00.permissions

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

#2 2005-02-17 01:30:04

wickedlester
Member
From: Texas, USA
Registered: 2004-07-22
Posts: 144

Re: udev and 00.permissions

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

#3 2005-02-17 01:58:56

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: udev and 00.permissions

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

#4 2005-02-17 02:03:47

dekernel
Member
From: Vassar, MI USA
Registered: 2004-03-22
Posts: 117

Re: udev and 00.permissions

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

#5 2005-02-17 03:09:06

dekernel
Member
From: Vassar, MI USA
Registered: 2004-03-22
Posts: 117

Re: udev and 00.permissions

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

#6 2005-02-17 04:06:57

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: udev and 00.permissions

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

#7 2005-02-17 06:42:37

colnago
Member
From: Victoria, BC
Registered: 2004-03-25
Posts: 438

Re: udev and 00.permissions

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

#8 2005-02-17 11:26:32

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: udev and 00.permissions

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.

:?


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#9 2005-02-17 20:14:01

beniro
Member
From: St. Petersburg, FL, USA
Registered: 2002-12-31
Posts: 313

Re: udev and 00.permissions

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

#10 2005-02-17 20:20:25

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: udev and 00.permissions

what dou you mean - no sound?

Modules loaded?
Devices there?
Permissions OK?


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#11 2005-02-17 20:29:08

colnago
Member
From: Victoria, BC
Registered: 2004-03-25
Posts: 438

Re: udev and 00.permissions

Make sure that the 00... file is in the rules.d directory, as the permissions.d one is no longer used.

Offline

#12 2005-02-17 20:40:24

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: udev and 00.permissions

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".

Offline

#13 2005-02-17 21:11:32

beniro
Member
From: St. Petersburg, FL, USA
Registered: 2002-12-31
Posts: 313

Re: udev and 00.permissions

IceRAM's solution worked.  I had vastly over complicated the situation.

Thanks for your help!

Offline

#14 2005-02-18 01:24:19

dekernel
Member
From: Vassar, MI USA
Registered: 2004-03-22
Posts: 117

Re: udev and 00.permissions

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

#15 2005-02-19 04:09:30

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: udev and 00.permissions

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

Board footer

Powered by FluxBB