Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to fix: "/dev/dsp: permission denied"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
irasnyd
Apprentice
Apprentice


Joined: 16 Feb 2003
Posts: 286
Location: Placentia, CA

PostPosted: Thu Apr 24, 2003 10:54 pm    Post subject: how to fix: "/dev/dsp: permission denied" Reply with quote

I keep getting this error when I try to play UT (and other games). The permissions on /dev/dsp are 555 (lr-xr-xr-x).

Code:

open /dev/dsp: Permission denied
Audio initialization failed.


I am in the user groups: wheel, users, games
I tried adding myself to the audio group, but it doesnt exist.

When I run UT as root, I get sound just fine though.

Thanks,
irasnyd
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9608
Location: beyond the rim

PostPosted: Fri Apr 25, 2003 2:17 am    Post subject: Reply with quote

Well, for me /dev/dsp is a symlink to /dev/sound/dsp, which has permissions set to 660 (rw-rw----). This file is owned by user root and group audio. So you have to be either root or be in the audio group to use this.
Back to top
View user's profile Send private message
irasnyd
Apprentice
Apprentice


Joined: 16 Feb 2003
Posts: 286
Location: Placentia, CA

PostPosted: Fri Apr 25, 2003 6:15 am    Post subject: Reply with quote

Yep. Got it working. I guess when I tried to add myself to the audio group, I screwed something up, because I did it again, and now it's working great.

Thanks!
Back to top
View user's profile Send private message
PARENA
Guru
Guru


Joined: 06 Jan 2003
Posts: 349

PostPosted: Fri Apr 25, 2003 7:42 am    Post subject: Reply with quote

I have a different problem. Using devfs and it says this in /etc/devfsd.conf

Code:
REGISTER        sound/.*     PERMISSIONS root.audio 660
REGISTER        snd/.*       PERMISSIONS root.audio 660


Looks fine to me. But, I start X twice (GDM). When I log in, permissions get set to rx------- for parena.audio

So, when my wife logs in, she gets permission denied. How do I fix this? I want 2 people from 2 different logins to have permissions. Anyone?
Back to top
View user's profile Send private message
Anarky
n00b
n00b


Joined: 25 May 2003
Posts: 30
Location: France

PostPosted: Sun May 25, 2003 9:26 pm    Post subject: Same problem Reply with quote

I also have this problem

Code:
/etc/devfsd.conf
REGISTER        sound/.*     PERMISSIONS root.audio 660
REGISTER        snd/.*       PERMISSIONS root.audio 660


Code:
[anarky@pc-rbn1191]~ % ls -l /dev/sound
crw-------    1 anarky   audio     14,   4 1970-01-01 01:00 audio
crw-rw----    1 root     audio     14,   3 1970-01-01 01:00 dsp
crw-rw----    1 root     audio     14,  19 1970-01-01 01:00 dsp1
crw-------    1 anarky   audio     14,   5 1970-01-01 01:00 dspW
crw-rw----    1 root     audio     14,   2 1970-01-01 01:00 midi
crw-rw----    1 root     audio     14,  18 1970-01-01 01:00 midi1
crw-rw----    1 root     audio     14,   0 1970-01-01 01:00 mixer
crw-------    1 anarky   audio     14,   1 1970-01-01 01:00 sequencer
crw-------    1 anarky   audio     14,   8 1970-01-01 01:00 sequencer2


I don't understand why those devices' owner isn't root ...
If anyone had an idea ...
thanks
Back to top
View user's profile Send private message
Menno
n00b
n00b


Joined: 28 May 2003
Posts: 6

PostPosted: Wed May 28, 2003 1:28 pm    Post subject: Reply with quote

:cry:
The same like Anarky and Parena. I set /dev/sound to root.audio, with 660 through /etc/devfsd.conf. But indeed after a regular user has worked on the system, he/she is owner with 600 permissions.

I hope someone will come up with a solution.... I started digging but until now no result.

All the best
Back to top
View user's profile Send private message
DuF
Advocate
Advocate


Joined: 09 Dec 2002
Posts: 2687
Location: Paris

PostPosted: Wed May 28, 2003 2:01 pm    Post subject: Reply with quote

Maybe there is a link with :
Code:
/etc/security/console.perms


Check the group <sound> and adapt to your situation. The values are set at the first log just after the boot.
Back to top
View user's profile Send private message
Menno
n00b
n00b


Joined: 28 May 2003
Posts: 6

PostPosted: Thu May 29, 2003 3:33 am    Post subject: Reply with quote

Yes, you are right, that's it.
Thanks a lot!
Menno
Back to top
View user's profile Send private message
Menno
n00b
n00b


Joined: 28 May 2003
Posts: 6

PostPosted: Thu May 29, 2003 4:19 am    Post subject: PAM/console.perms strange behaviour?? Reply with quote

I followed DuF his advice to look at console.perms. I chose to comment out sound, and now it works fine. Permissions are set by /etc/devfsd.conf. I also fixed some permissions on floppy in console.perms, but here is what happens:
Permissions and ownership are set to:
<console> 0660 <floppy> 0660 root.floppy
But when "menno" or another user logs in, the permissions/ownership is as follows:
brw-rw---- 1 menno floppy 2, 28 Jan 1 1970 0u1440
Isn't this strange? This means that if a user logs in, he/she will become owner instead of root, who is explicitly set in /etc/security/console.perms.
I checked the man page, but no result, can someone explain this behaviour?

Thanks again!
Back to top
View user's profile Send private message
DuF
Advocate
Advocate


Joined: 09 Dec 2002
Posts: 2687
Location: Paris

PostPosted: Thu May 29, 2003 5:14 pm    Post subject: Reply with quote

Yes, it's that, the first logged is the owner of the files, don't know why, but I've read this in this forum... maybe you can try to search threads about console.perms in gentoo forums to look if someone provide an explanation.
Back to top
View user's profile Send private message
Menno
n00b
n00b


Joined: 28 May 2003
Posts: 6

PostPosted: Thu May 29, 2003 5:46 pm    Post subject: Reply with quote

Yeah, good idea but I did that already, I read a lot of nice things but not that. Still this behaviour is strange. For example: A user starts the system, logs in, browses the web etc. Then he likes to scan a picture so he plugs the USB-scanner. The permissions will not be set by console.perms until somebody else logs in. Strange IMHO, I would think permissions need to be dealt with in one place (devfs is most suitable I'd say), this leads to confusion.

Thanks again!
Back to top
View user's profile Send private message
gagern
n00b
n00b


Joined: 26 Nov 2003
Posts: 54

PostPosted: Wed Nov 26, 2003 1:04 pm    Post subject: Reply with quote

The format of console.perm is:
Code:

       CONSOLE  PERM_SET  FILES  PERM_RESET  OWNER_RESET
e.g.  <console>   0600   <sound>    0600     root.audio


That means that when you log onto CONSOLE and nobody else is logged in locally, ownership of FILES is set to you and permissions set to PERM_SET. When you log out (all your local sessions), ownership is transferred to OWNER_RESET and permissions set to PERM_RESET.

So you can' specify that the file should be owned by root when someone is logged in locally, you can only specify the default owner when nobody is logged in at a console.
Back to top
View user's profile Send private message
Menno
n00b
n00b


Joined: 28 May 2003
Posts: 6

PostPosted: Wed Nov 26, 2003 1:34 pm    Post subject: Reply with quote

This clarifies things, thanks. I think you mean can't instead of "can'"?

OK, it is possible to share devices as usual, by using perms of 0660 for example. However, my personal opinion is that it remains strange that the "first" logged in person becomes owner, not that it is very important, but it just doesn't make sense IMHO. On a single user system things are OK, but on a multi-user system it looks messy IMHO. Therefore I commented out things in console.perms and let devfsd.conf handle my permissions.

Thanks again!
Meno
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players 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