Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HELP: /dev/sound/* permissions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
barvaz
n00b
n00b


Joined: 01 Sep 2002
Posts: 8

PostPosted: Sun Sep 01, 2002 9:25 pm    Post subject: HELP: /dev/sound/* permissions Reply with quote

Hi all,

I have a problem with permissions to /dev/sound/* for any user that is not root.

I did everything that was suggested on these forums: adding the user to audio group, editing /etc/devfsd.conf, chmod 666 /dev/sound/dsp, logging in and out, rebooting.

I always get the same result, user get premission denied for /dev/sound/dsp or any other device under /dev/sound/

Anyone has any idea what is going on ?

Thanks.
Back to top
View user's profile Send private message
pilla
Bodhisattva
Bodhisattva


Joined: 07 Aug 2002
Posts: 7729
Location: Underworld

PostPosted: Mon Sep 02, 2002 12:06 am    Post subject: Re: HELP: /dev/sound/* permissions Reply with quote

Could you post the snd sessions in /etc/devfsd.conf ?

You can also check if your user is in audio group by running
Code:

groups


as the desired user in command line

barvaz wrote:
Hi all,

I have a problem with permissions to /dev/sound/* for any user that is not root.

I did everything that was suggested on these forums: adding the user to audio group, editing /etc/devfsd.conf, chmod 666 /dev/sound/dsp, logging in and out, rebooting.

I always get the same result, user get premission denied for /dev/sound/dsp or any other device under /dev/sound/

Anyone has any idea what is going on ?

Thanks.
Back to top
View user's profile Send private message
barvaz
n00b
n00b


Joined: 01 Sep 2002
Posts: 8

PostPosted: Mon Sep 02, 2002 6:19 am    Post subject: Reply with quote

Yes, "groups" shows that the user is in the audio group.

This is what I have in /etc/devfsd.conf
Code:

LOOKUP          snd          MODLOAD ACTION snd
LOOKUP          dsp          MODLOAD
LOOKUP          mixer        MODLOAD
LOOKUP          midi         MODLOAD
REGISTER        sound/.*     PERMISSIONS root.audio 666
REGISTER        snd/.*       PERMISSIONS root.audio 666


Premissions were originally 660, I changed them to 666 as a possible solution that was suggested somewhere but it didn't help.


ls -l /dev/sound/dsp gives me:
Code:

crw-rw-rw-    1 root     audio     14,   3 Jan  1  1970 /dev/sound/dsp


But when when I do "cat /dev/sound/dsp" as the non-root user. I get permission denied.


Thanks.
Back to top
View user's profile Send private message
pilla
Bodhisattva
Bodhisattva


Joined: 07 Aug 2002
Posts: 7729
Location: Underworld

PostPosted: Mon Sep 02, 2002 3:47 pm    Post subject: Reply with quote

Looks OK, the only difference is that I use 660 (should make no difference)

barvaz wrote:
Yes, "groups" shows that the user is in the audio group.

This is what I have in /etc/devfsd.conf
Code:

LOOKUP          snd          MODLOAD ACTION snd
LOOKUP          dsp          MODLOAD
LOOKUP          mixer        MODLOAD
LOOKUP          midi         MODLOAD
REGISTER        sound/.*     PERMISSIONS root.audio 666
REGISTER        snd/.*       PERMISSIONS root.audio 666


Premissions were originally 660, I changed them to 666 as a possible solution that was suggested somewhere but it didn't help.


ls -l /dev/sound/dsp gives me:
Code:

crw-rw-rw-    1 root     audio     14,   3 Jan  1  1970 /dev/sound/dsp


But when when I do "cat /dev/sound/dsp" as the non-root user. I get permission denied.


Thanks.



Look if /dev/sound has also the correct permissions.
Code:

drwxr-xr-x    1 root     root            0 Dec 31  1969 sound



Are you sure the correct modules for your sound are loaded (or compiled into the kernel)?

Try to test it without window managers...
Back to top
View user's profile Send private message
inukshuk
Tux's lil' helper
Tux's lil' helper


Joined: 31 Aug 2002
Posts: 110
Location: vienna (europe)

PostPosted: Mon Sep 02, 2002 6:00 pm    Post subject: Reply with quote

can you play sound as root?

when exactly do you get a permission denied? can you access the devices from command line? i.e. does

Code:
cat /path/to/sound/file.wav > /dev/sound/dsp


produce sound?
Back to top
View user's profile Send private message
barvaz
n00b
n00b


Joined: 01 Sep 2002
Posts: 8

PostPosted: Mon Sep 02, 2002 10:13 pm    Post subject: Reply with quote

Seems like the problem was premissions to the /dev/sound directory itself.

It works now ! And I learned something...

Thanks to all who replied.
Back to top
View user's profile Send private message
nihil
n00b
n00b


Joined: 06 Sep 2002
Posts: 1
Location: Maine

PostPosted: Fri Sep 06, 2002 4:12 pm    Post subject: sound permissions Reply with quote

barvaz wrote:
Seems like the problem was premissions to the /dev/sound directory itself.

It works now ! And I learned something...

Thanks to all who replied.


What did you set the permission to? Did it stick after you rebooted?
I've tried everything sugested here, but I get the same problem when I reboot.
Back to top
View user's profile Send private message
kyptin
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jun 2002
Posts: 95
Location: UNC (Chapel Hill, NC, USA)

PostPosted: Sun Sep 29, 2002 12:38 am    Post subject: permissions should be: Reply with quote

I was messing around trying to figure everything out, following everybody's tips and all, yet I still couldn't get it to work. Finally, I realized /dev/sound's permissions were rw, not rwx (maybe I wasn't reading the tips so carefully after all...) Anyway, to sum everything up, do the following (do these as root):
Code:
cd /dev/sound
chmod 770 .
chown root:audio .
chmod 660 *
chown root:audio *

Then get a list of the groups for your user by
Code:
groups <username>

Note: "users" is (probably) your primary group. Here we're only concerned about the secondary groups. If "audio" is not in that list, then do
Code:
usermod -G audio,<grouplist> <username>


I think that usermod will erase you from your other secondary groups unless you specify all of them. If, for instance, the "groups" output gives
Code:
wheel users

and you do a
Code:
usermod -G audio <username>

then the "groups" output will then be
Code:
audio users

To fix this, add on all secondary groups + audio after the -G option (as above).

Also check /etc/devfsd.conf as above. Hope this helps!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum