View previous topic :: View next topic |
Author |
Message |
irasnyd Apprentice
Joined: 16 Feb 2003 Posts: 286 Location: Placentia, CA
|
Posted: Thu Apr 24, 2003 10:54 pm Post subject: how to fix: "/dev/dsp: permission denied" |
|
|
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 |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9611 Location: beyond the rim
|
Posted: Fri Apr 25, 2003 2:17 am Post subject: |
|
|
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 |
|
|
irasnyd Apprentice
Joined: 16 Feb 2003 Posts: 286 Location: Placentia, CA
|
Posted: Fri Apr 25, 2003 6:15 am Post subject: |
|
|
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 |
|
|
PARENA Guru
Joined: 06 Jan 2003 Posts: 349
|
Posted: Fri Apr 25, 2003 7:42 am Post subject: |
|
|
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 |
|
|
Anarky n00b
Joined: 25 May 2003 Posts: 30 Location: France
|
Posted: Sun May 25, 2003 9:26 pm Post subject: Same problem |
|
|
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 |
|
|
Menno n00b
Joined: 28 May 2003 Posts: 6
|
Posted: Wed May 28, 2003 1:28 pm Post subject: |
|
|
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 |
|
|
DuF Advocate
Joined: 09 Dec 2002 Posts: 2687 Location: Paris
|
Posted: Wed May 28, 2003 2:01 pm Post subject: |
|
|
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 |
|
|
Menno n00b
Joined: 28 May 2003 Posts: 6
|
Posted: Thu May 29, 2003 3:33 am Post subject: |
|
|
Yes, you are right, that's it.
Thanks a lot!
Menno |
|
Back to top |
|
|
Menno n00b
Joined: 28 May 2003 Posts: 6
|
Posted: Thu May 29, 2003 4:19 am Post subject: PAM/console.perms strange behaviour?? |
|
|
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 |
|
|
DuF Advocate
Joined: 09 Dec 2002 Posts: 2687 Location: Paris
|
Posted: Thu May 29, 2003 5:14 pm Post subject: |
|
|
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 |
|
|
Menno n00b
Joined: 28 May 2003 Posts: 6
|
Posted: Thu May 29, 2003 5:46 pm Post subject: |
|
|
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 |
|
|
gagern n00b
Joined: 26 Nov 2003 Posts: 54
|
Posted: Wed Nov 26, 2003 1:04 pm Post subject: |
|
|
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 |
|
|
Menno n00b
Joined: 28 May 2003 Posts: 6
|
Posted: Wed Nov 26, 2003 1:34 pm Post subject: |
|
|
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 |
|
|
|