You are not logged in.

#1 2004-12-15 04:48:52

Shofs
Member
From: Central Illinois
Registered: 2004-12-15
Posts: 184

UDev not setting correct group / permissions

Hello, I am a new user of Arch, switched from Gentoo.

I can't figure out why my devices aren't being set up properly. Here is my udev config . . .

# audio devices
dsp*:root:audio:0660
audio*:root:audio:0660
midi*:root:audio:0660
mixer*:root:audio:0660
sequencer*:root:audio:0660
sound/*:root:audio:0660
snd/*:root:audio:0660
beep:root:audio:0660
admm*:root:audio:0660
adsp*:root:audio:0660
aload*:root:audio:0660
amidi*:root:audio:0660
dmfm*:root:audio:0660
dmmidi*:root:audio:0660
sndstat:root:audio:0660

...

# optical devices
cdrom*:root:optical:0660
dvd:root:optical:0660
cdroms/*:root:optical:0660
cdrw:root:burning:0660
 ...

A listing of the actual devices yields this though.

[root@dogma ~]# ls /dev/dsp /dev/sound/ /dev/dvd /dev/cdrw /dev/cdroms/ -l
lrwxrwxrwx  1 root root 3 2004-12-14 22:03 /dev/cdrw -> hdd
lrwxrwxrwx  1 root root 9 2004-12-14 22:03 /dev/dsp -> sound/dsp
lrwxrwxrwx  1 root root 3 2004-12-14 22:03 /dev/dvd -> hdc

/dev/cdroms/:
total 0
lrwxrwxrwx  1 root root 6 2004-12-14 22:03 cdrom -> ../hdd

/dev/sound/:
total 0
crw-rw----  1 root audio 14, 4 2004-12-14 22:03 audio
crw-rw----  1 root audio 14, 9 2004-12-14 22:03 dmmidi
crw-rw----  1 root audio 14, 3 2004-12-14 22:03 dsp
crw-rw----  1 root audio 14, 2 2004-12-14 22:03 midi
crw-rw----  1 root audio 14, 0 2004-12-14 22:03 mixer

Offline

#2 2004-12-15 06:06:42

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: UDev not setting correct group / permissions

do you have devfs=nomount in either lilo.conf or grub/menu.lst?

if using lilo, have you rerun lilo to commit these boot changes?

Offline

#3 2004-12-15 13:33:46

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: UDev not setting correct group / permissions

I don't see what your problem is, you have "sound/*:root:audio:0660" and all files in the sound dir get those permissions.

Or aren't you happy with the permissions of the symlinks?? If so, then don't worry: symlink only redirect the file access to the file they point to, and then the permissions of the real file are checked. The permission of the symlink itself is ignored.

Example:

tmp $ touch bla
tmp $ ln -s bla link
tmp $ ll
total 0
-rw-r--r--  1 indan users 0 Dec 15 14:28 bla
lrwxr-xr-x  1 indan users 3 Dec 15 14:28 link -> bla

Offline

#4 2004-12-15 22:41:18

Shofs
Member
From: Central Illinois
Registered: 2004-12-15
Posts: 184

Re: UDev not setting correct group / permissions

phrakture wrote:

do you have devfs=nomount in either lilo.conf or grub/menu.lst?

if using lilo, have you rerun lilo to commit these boot changes?

Yep.

title  Arch Linux 2.6.5
root   (hd0,0)
kernel /bzImage-2.6.5-udev root=/dev/discs/disc0/part3 devfs=nodevfs ro

Or aren't you happy with the permissions of the symlinks??

Nope.

I want the real file to belong to the audio group as well.

Offline

#5 2004-12-15 23:12:41

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: UDev not setting correct group / permissions

All real files you listed already belong to the audio group, so what's your problem?

Offline

#6 2004-12-15 23:32:11

Shofs
Member
From: Central Illinois
Registered: 2004-12-15
Posts: 184

Re: UDev not setting correct group / permissions

Quoting my self . . .

rmbalfa wrote:

A listing of the actual devices yields this though.

[root@dogma ~]# ls /dev/dsp /dev/sound/ /dev/dvd /dev/cdrw /dev/cdroms/ -l
lrwxrwxrwx  1 root root 3 2004-12-14 22:03 /dev/cdrw -> hdd
lrwxrwxrwx  1 root root 9 2004-12-14 22:03 /dev/dsp -> sound/dsp
lrwxrwxrwx  1 root root 3 2004-12-14 22:03 /dev/dvd -> hdc

/dev/cdroms/:
total 0
lrwxrwxrwx  1 root root 6 2004-12-14 22:03 cdrom -> ../hdd

No, they belong to root:root

Offline

#7 2004-12-15 23:37:20

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: UDev not setting correct group / permissions

All those files are symlinks, and I assumed you meant with "real files" the device files instead of also the symlinks... Notice that 'l' as first char in the permissions? That means it's a symlink (though noticing the big redirection "-> otherfile" is easier).

Offline

#8 2004-12-15 23:42:58

Shofs
Member
From: Central Illinois
Registered: 2004-12-15
Posts: 184

Re: UDev not setting correct group / permissions

I only said "real file" because you said it in your first post. Yes, i want the symlinks AND the "real files" to belong to the audio group (see my udev permissions).

I don't know why they don't all belong to the audio group. I must have messed up something, but i am not sure what.

Offline

#9 2004-12-15 23:52:29

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: UDev not setting correct group / permissions

rmbalfa wrote:
title  Arch Linux 2.6.5
root   (hd0,0)
kernel /bzImage-2.6.5-udev root=/dev/discs/disc0/part3 devfs=nodevfs ro

it should be devfs=nomount - i'll assume you just typoed it... maybe... check "ps aux | grep udev" to see if udev is running....


rmbalfa wrote:

I want the real file to belong to the audio group as well.

the real file does belong to the group - it's the symlink that doesn't... and as was said earlier, symlink permissions don't mean jack, because it will follow the link before checking permissions...

I think symlinks have permissions according to who created them... so if you really want the symlinks in a diff group, make a "udevd" user and add him to group audio... and run udev as that user and not root....

Offline

#10 2004-12-16 00:06:50

Shofs
Member
From: Central Illinois
Registered: 2004-12-15
Posts: 184

Re: UDev not setting correct group / permissions

Thanks, that explains it well.

And yes, udev IS running even though I have the wrong syntax. I was using the old Gentoo syntax of gentoo=nodevfs.

Offline

#11 2004-12-16 00:24:41

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: UDev not setting correct group / permissions

After experimenting a bit with symlinks, this are the observations:

1) When creating a symlink it will get the permissions according to umask.

2) The permissions are ignored everywhere and never used.

3) Write access to a symlink is the same as for the directory it is in.

4) The owner and group information is totally ignored.

5) You can't do chmod on symlinks, nor most other file operations because they're redirected, only chown, stat, rename seem to works.


Conclusion:

Wanting the symlinks to have a certain group makes no sense, because that info is ignored.

Offline

Board footer

Powered by FluxBB