View previous topic :: View next topic |
Author |
Message |
Marcel de Reus n00b
Joined: 12 Jul 2003 Posts: 22 Location: Rotterdam, The Netherlands
|
Posted: Tue Jul 15, 2003 8:01 pm Post subject: Remote XMMS, permission problems |
|
|
After using the search, I decide to open a new topic, cause the my problem differs from the other.
My problem is the following:
If I log in on my desktop and start XMMS with the ALSA or OSS plugin, everything is really fine and works.
Also if I login over ssh with X-tunneling and nobody else is working or had worked before on the desktop everything works great with the ALSA plugin, the OSS one gives this error:
Quote: | ** WARNING **: oss_open(): Failed to open audio device (/dev/sound/dsp): No such file or directory |
The problem is, when somebody login on the desktop I get the persmission errors of ALSA or OSS. The reason is simple, devfs, cause I hadn't the prob on Slack with exactly the same method.
And yes, when I searched for a reason, I found it. If somebody logs in onto my desktop, he gets the permission of the sound device.
Quote: | marcel@haldir marcel $ ls -l /dev/snd/
total 0
crw------- 1 marcel audio 116, 0 Jan 1 1970 controlC0
crw------- 1 marcel audio 116, 4 Jan 1 1970 hwC0D0
crw------- 1 marcel audio 116, 8 Jan 1 1970 midiC0D0
crw------- 1 marcel audio 116, 9 Jan 1 1970 midiC0D1
crw------- 1 marcel audio 116, 24 Jan 1 1970 pcmC0D0c
crw------- 1 marcel audio 116, 16 Jan 1 1970 pcmC0D0p
crw------- 1 marcel audio 116, 25 Jan 1 1970 pcmC0D1c
crw------- 1 marcel audio 116, 26 Jan 1 1970 pcmC0D2c
crw------- 1 marcel audio 116, 19 Jan 1 1970 pcmC0D3p
crw------- 1 marcel audio 116, 33 Jan 1 1970 timer
marcel@haldir marcel $
|
and all others are excluded from acces. How do I fix this? It's no problem that the user that logs in het the rights, but the should be 660 and not 600. This is in my devfsd config file:
Quote: |
# ALSA/OSS stuff
# Comment/change these if you want to change the permissions on
# the audio devices
LOOKUP snd MODLOAD ACTION snd
LOOKUP dsp MODLOAD
LOOKUP mixer MODLOAD
LOOKUP midi MODLOAD
REGISTER sound/.* PERMISSIONS root.audio 660
REGISTER snd/.* PERMISSIONS root.audio 660
|
and seems to be correct, cause directy after the boot, the permissions are:
Quote: | marcel@haldir marcel $ ls -l /dev/snd/
total 0
crw-rw---- 1 root audio 116, 0 Jan 1 1970 controlC0
crw-rw---- 1 root audio 116, 4 Jan 1 1970 hwC0D0
crw-rw---- 1 root audio 116, 8 Jan 1 1970 midiC0D0
crw-rw---- 1 root audio 116, 9 Jan 1 1970 midiC0D1
crw-rw---- 1 root audio 116, 24 Jan 1 1970 pcmC0D0c
crw-rw---- 1 root audio 116, 16 Jan 1 1970 pcmC0D0p
crw-rw---- 1 root audio 116, 25 Jan 1 1970 pcmC0D1c
crw-rw---- 1 root audio 116, 26 Jan 1 1970 pcmC0D2c
crw-rw---- 1 root audio 116, 19 Jan 1 1970 pcmC0D3p
crw-rw---- 1 root audio 116, 33 Jan 1 1970 timer
marcel@haldir marcel $
|
an solution would be that KDE doesn't capture the soundcard and give it to the user, but where to set that?
many thank to the hero who brings me the answer _________________ GNU/Linux is userfriendly, it's just very picky about who its friends are.
Use GPG! marceldereus@nedlinux.nl
Use Jabber! marceldereus@jabber.org
Last edited by Marcel de Reus on Sun Aug 03, 2003 3:10 pm; edited 1 time in total |
|
Back to top |
|
|
puggy Bodhisattva
Joined: 28 Feb 2003 Posts: 1992 Location: Oxford, UK
|
Posted: Wed Jul 16, 2003 5:36 pm Post subject: |
|
|
I'm not sure I fully understand the problem. You say it works locally on the desktop and over the network and then you say it doesn't work on the desktop which contradicts your earlier statement.
I guess that the answer you might be looking for is ass your users to the audio group.
Puggy _________________ Where there's open source , there's a way. |
|
Back to top |
|
|
Marcel de Reus n00b
Joined: 12 Jul 2003 Posts: 22 Location: Rotterdam, The Netherlands
|
Posted: Wed Jul 16, 2003 5:43 pm Post subject: |
|
|
You don't understand the problem.
Everything works fine IF nobody logins on my desktop. After the local login of a person on my desktop, the rights of the sound device change so I get a permission denied on the ALSA device.
Al my users on the desktop are in the audio group as wel my remote login user. Group shoes also the audio groep, but also the audio group has no permission to the sound devices if somebody locally logins on te desktop.
So:
1) desktop boots
2) I log in remote and everything works
3) I log out
4) my sister for example logs locally in on the desktop and get al permission of the sound devices
5) I log in, and can't play music any more _________________ GNU/Linux is userfriendly, it's just very picky about who its friends are.
Use GPG! marceldereus@nedlinux.nl
Use Jabber! marceldereus@jabber.org |
|
Back to top |
|
|
puggy Bodhisattva
Joined: 28 Feb 2003 Posts: 1992 Location: Oxford, UK
|
Posted: Wed Jul 16, 2003 5:51 pm Post subject: |
|
|
Marcel de Reus wrote: | You don't understand the problem.
Everything works fine IF nobody logins on my desktop. After the local login of a person on my desktop, the rights of the sound device change so I get a permission denied on the ALSA device.
Al my users on the desktop are in the audio group as wel my remote login user. Group shoes also the audio groep, but also the audio group has no permission to the sound devices if somebody locally logins on te desktop.
So:
1) desktop boots
2) I log in remote and everything works
3) I log out
4) my sister for example logs locally in on the desktop and get al permission of the sound devices
5) I log in, and can't play music any more |
Ok. Try disabling arts. You can do that by going to settings->control centre->Sound and multimedia->sound system and unticking the Start arts on KDE startup box.
EDIT: And then restarting obviously.
Puggy _________________ Where there's open source , there's a way. |
|
Back to top |
|
|
Marcel de Reus n00b
Joined: 12 Jul 2003 Posts: 22 Location: Rotterdam, The Netherlands
|
Posted: Wed Jul 16, 2003 7:18 pm Post subject: |
|
|
No effect
The user still captures rights of the sound card. If I restart alsasound after the login everybody is happy. But that is not really a clean solution and there must be some way. _________________ GNU/Linux is userfriendly, it's just very picky about who its friends are.
Use GPG! marceldereus@nedlinux.nl
Use Jabber! marceldereus@jabber.org |
|
Back to top |
|
|
puggy Bodhisattva
Joined: 28 Feb 2003 Posts: 1992 Location: Oxford, UK
|
Posted: Wed Jul 16, 2003 7:20 pm Post subject: |
|
|
Marcel de Reus wrote: | No effect
The user still captures rights of the sound card. If I restart alsasound after the login everybody is happy. But that is not really a clean solution and there must be some way. |
You did add alsasound to your boot runlevel didn't you? Not default. _________________ Where there's open source , there's a way. |
|
Back to top |
|
|
Marcel de Reus n00b
Joined: 12 Jul 2003 Posts: 22 Location: Rotterdam, The Netherlands
|
Posted: Wed Jul 16, 2003 7:23 pm Post subject: |
|
|
yes it's under boot _________________ GNU/Linux is userfriendly, it's just very picky about who its friends are.
Use GPG! marceldereus@nedlinux.nl
Use Jabber! marceldereus@jabber.org |
|
Back to top |
|
|
puggy Bodhisattva
Joined: 28 Feb 2003 Posts: 1992 Location: Oxford, UK
|
Posted: Wed Jul 16, 2003 7:25 pm Post subject: |
|
|
I don't understand why KDE would reassign permissions, it certainly doesn't on my machine. Can you post the alsa section of your defvs config.
Puggy _________________ Where there's open source , there's a way. |
|
Back to top |
|
|
Marcel de Reus n00b
Joined: 12 Jul 2003 Posts: 22 Location: Rotterdam, The Netherlands
|
Posted: Wed Jul 16, 2003 7:28 pm Post subject: |
|
|
I post it in my first post.
It's not KDE BTW, also logging in on TWM changes the permissions of the sound device. _________________ GNU/Linux is userfriendly, it's just very picky about who its friends are.
Use GPG! marceldereus@nedlinux.nl
Use Jabber! marceldereus@jabber.org |
|
Back to top |
|
|
puggy Bodhisattva
Joined: 28 Feb 2003 Posts: 1992 Location: Oxford, UK
|
Posted: Wed Jul 16, 2003 7:34 pm Post subject: |
|
|
Have you completely removed all the OSS stuff from your kernel, or if they were modules, unloaded them and removed them from your modules.autoload? Except soundcore (basic soundcard support).
Puggy _________________ Where there's open source , there's a way. |
|
Back to top |
|
|
Marcel de Reus n00b
Joined: 12 Jul 2003 Posts: 22 Location: Rotterdam, The Netherlands
|
Posted: Wed Jul 16, 2003 7:46 pm Post subject: |
|
|
I never used OSS.
Only soundcore is selected als module, but not in modules.autoload as said in the howto, this is the output of lsmod:
Code: | haldir root # lsmod
Module Size Used by Tainted: P
snd-emu10k1 75604 0
snd-hwdep 5344 0 [snd-emu10k1]
snd-pcm 68384 0 [snd-emu10k1]
snd-timer 17000 0 [snd-pcm]
snd-util-mem 1632 0 [snd-emu10k1]
snd-rawmidi 15712 0 [snd-emu10k1]
snd-seq-device 4516 0 [snd-emu10k1 snd-rawmidi]
snd-ac97-codec 38240 0 [snd-emu10k1]
snd 34340 0 [snd-emu10k1 snd-hwdep snd-pcm snd-timer snd-util-mem snd-rawmidi snd-seq-device snd-ac97-codec]
soundcore 4580 4 [snd]
sd_mod 11212 0 (autoclean) (unused)
sr_mod 16728 0 (autoclean) (unused)
floppy 52188 0 (autoclean)
agpgart 14772 3 (autoclean)
nvidia 1542752 10 (autoclean)
snd-page-alloc 5616 0 [snd-emu10k1 snd-pcm]
rtc 8380 0 (autoclean)
shfs 32368 0 (unused)
printer 7872 0
sg 30156 0 (unused)
ide-scsi 9008 0
scsi_mod 89716 4 [sd_mod sr_mod sg ide-scsi]
8139too 16392 1
mii 2592 0 [8139too]
thermal 14944 0 (unused)
processor 21516 0 [thermal]
fan 3232 0 (unused)
button 4460 0 (unused)
battery 9792 0 (unused)
ac 3712 0 (unused)
haldir root #
|
_________________ GNU/Linux is userfriendly, it's just very picky about who its friends are.
Use GPG! marceldereus@nedlinux.nl
Use Jabber! marceldereus@jabber.org |
|
Back to top |
|
|
puggy Bodhisattva
Joined: 28 Feb 2003 Posts: 1992 Location: Oxford, UK
|
Posted: Wed Jul 16, 2003 7:50 pm Post subject: |
|
|
Try disabling the OSS emulation on ALSA and seeing if that makes any difference. I'm out of ideas really. sorry.
Puggy _________________ Where there's open source , there's a way. |
|
Back to top |
|
|
Marcel de Reus n00b
Joined: 12 Jul 2003 Posts: 22 Location: Rotterdam, The Netherlands
|
Posted: Wed Jul 16, 2003 7:54 pm Post subject: |
|
|
How do I disable that?
It must be in devfsd on Slackware I never had this problem.
BTW also logins on the console reset the permission. There must be something executed at login :S _________________ GNU/Linux is userfriendly, it's just very picky about who its friends are.
Use GPG! marceldereus@nedlinux.nl
Use Jabber! marceldereus@jabber.org |
|
Back to top |
|
|
puggy Bodhisattva
Joined: 28 Feb 2003 Posts: 1992 Location: Oxford, UK
|
Posted: Wed Jul 16, 2003 8:01 pm Post subject: |
|
|
Marcel de Reus wrote: | How do I disable that?
It must be in devfsd on Slackware I never had this problem.
BTW also logins on the console reset the permission. There must be something executed at login :S |
But why would devfsd change the permissions when you log into a Desktop Environment, that doesn't make any sense.
In your alsa configuration...
Here is my config with no OSS emulation, but for 2 soundcards not 1.
Code: | # Alsa 0.9.X kernel modules' configuration file.
# $Header: /home/cvsroot/gentoo-x86/media-sound/alsa-driver/files/alsa-modules.conf-rc,v 1.1 2002/12/21 06:31:52 agenkin Exp $
# ALSA portion
alias char-major-116 snd
# OSS/Free portion
#alias char-major-14 soundcore
##
## IMPORTANT:
## You need to customise this section for your specific sound card(s)
## and then run `update-modules' command.
## Read alsa-driver's INSTALL file in /usr/share/doc for more info.
##
## ALSA portion
alias snd-card-0 snd-emu10k1
alias snd-card-1 snd-via82xx
# OSS/Free portion
#alias sound-slot-0 snd-card-0
#alias sound-slot-1 snd-card-1
#
# OSS/Free portion - card #1
#alias sound-service-0-0 snd-mixer-oss
#alias sound-service-0-1 snd-seq-oss
#alias sound-service-0-3 snd-pcm-oss
#alias sound-service-0-8 snd-seq-oss
#alias sound-service-0-12 snd-pcm-oss
# OSS/Free portion - card #2
#alias sound-service-1-0 snd-mixer-oss
#alias sound-service-1-3 snd-pcm-oss
#alias sound-service-1-12 snd-pcm-oss
alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss
# Set this to the correct number of cards.
options snd cards_limit=2 |
If you change this you must then obviously run Code: | modules-update && /etc/init.d/alsasound restart |
Puggy _________________ Where there's open source , there's a way. |
|
Back to top |
|
|
Marcel de Reus n00b
Joined: 12 Jul 2003 Posts: 22 Location: Rotterdam, The Netherlands
|
Posted: Wed Jul 16, 2003 9:24 pm Post subject: |
|
|
That was the trick, many thanks for your help. I had never find out myself, cause the HOWTO sets OSS emulation on.
Who I'm punking, the musics back again _________________ GNU/Linux is userfriendly, it's just very picky about who its friends are.
Use GPG! marceldereus@nedlinux.nl
Use Jabber! marceldereus@jabber.org |
|
Back to top |
|
|
puggy Bodhisattva
Joined: 28 Feb 2003 Posts: 1992 Location: Oxford, UK
|
Posted: Wed Jul 16, 2003 9:28 pm Post subject: |
|
|
Marcel de Reus wrote: | That was the trick, many thanks for your help. I had never find out myself, cause the HOWTO sets OSS emulation on.
Who I'm punking, the musics back again |
Not a problem dude. It's weird that the OSS emulation doesn't work though.
FYI:
I just removed the Code: | alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss | from my alsa config as well and it still works. I just realised they are the reason I have a /dev/dsp etc which obviously do nothing without the OSS emulation itself.
Puggy _________________ Where there's open source , there's a way. |
|
Back to top |
|
|
Marcel de Reus n00b
Joined: 12 Jul 2003 Posts: 22 Location: Rotterdam, The Netherlands
|
Posted: Thu Jul 17, 2003 12:25 pm Post subject: |
|
|
I made a mistake, it won't work
So we are still as far as in the begin of the topic. I go on holiday for two weeks tomorrow. If somebody know, please post it and I will read it after I come back. _________________ GNU/Linux is userfriendly, it's just very picky about who its friends are.
Use GPG! marceldereus@nedlinux.nl
Use Jabber! marceldereus@jabber.org |
|
Back to top |
|
|
wpb44 n00b
Joined: 02 May 2002 Posts: 31
|
Posted: Sun Jul 27, 2003 3:31 pm Post subject: |
|
|
Nice to see that others also do have this problem.
But I think I can put in another aspect: I do NOT use ALSA and I also have this problem.
Short overview of my configuration and problem:
* I use Kernel 2.4.22-pre1 and used 2.4.20-gentoo before, same results
* OSS is configured in the kernel as done many times before, no modules, only hard linked sound driver for my ENSONIC1371 compatible card
* I have the same (default) configuration of devfsd as the initial poster, which says sound devices belong to root.audio and have permissions 660
* After boot, everything's just fine, rw-rw---- root audio on all sound device entries.
* After launching either kde directly or randomly after using any other GUI locally on that machine, permissions are given to the user that launched the GUI with rights 600
* I do have disabled ARTS and other kind of that crap. Only plain OSS.
* I say, the user can do "startx" which lauches kde (I said so in my configuration) and permissions get changed.
So this must be a really critical bug in devfsd or something, because a non-root-user changes permissions of /dev/sound/*!
My problem is that this is not fully reproducible. It's IIRC fully reproducible with KDE and it happened also some times with IceWM or any other windows manager that definitely has no sound functionality. KDE has some app running SUID root, so It's also possible that this is not devfsd's fault...
I did not find any answer, perhaps someone can help me with this. I occurs on any gentoo boxes I own, whether I use ALSA or OSS. You mostly do not realize it if you own a single-user machine.
Any ideas?
cu, Bernd |
|
Back to top |
|
|
Marcel de Reus n00b
Joined: 12 Jul 2003 Posts: 22 Location: Rotterdam, The Netherlands
|
Posted: Fri Aug 01, 2003 2:53 pm Post subject: |
|
|
I'm glad to see I'm not the only one having this problem. I came just back from vacation and restart try to fix it right now, but I don't have very much hope.
I don't thinks is a fault by KDE or something, because also a non grafical text logins affects the rights here. Is there something executed when a user logs in? This is very nasty, because I used remoted playing music over 7 hours a day.
Is there possible a way to turn devfs off without having many problems? I never used it under Slackware and everythings worked great. _________________ GNU/Linux is userfriendly, it's just very picky about who its friends are.
Use GPG! marceldereus@nedlinux.nl
Use Jabber! marceldereus@jabber.org |
|
Back to top |
|
|
wpb44 n00b
Joined: 02 May 2002 Posts: 31
|
Posted: Fri Aug 01, 2003 4:28 pm Post subject: |
|
|
Hi.
If you want to fake, you can do it another way:
Install sudo and allow the user to set the permissions of /dev/sound/* (e.g. per script). You can execute that script on every logon automatically or manually when needed. That works for me, even when it is not really a good solution.
You can e.g. create a small script that contains
Code: |
#!/bin/bash
chown root:audio /dev/sound/*
chmod 660 /dev/sound/*
|
and allow the user to execute it via sudo.
cu, Bernd |
|
Back to top |
|
|
Marcel de Reus n00b
Joined: 12 Jul 2003 Posts: 22 Location: Rotterdam, The Netherlands
|
Posted: Fri Aug 01, 2003 7:11 pm Post subject: |
|
|
that's really a good idea, I planned allready to write a script so I only have to type xmms-2 or something for starting it remote and this is a kewl solution
I gonna try sudo and make a script and you'll hear if it works, many thanks _________________ GNU/Linux is userfriendly, it's just very picky about who its friends are.
Use GPG! marceldereus@nedlinux.nl
Use Jabber! marceldereus@jabber.org |
|
Back to top |
|
|
Marcel de Reus n00b
Joined: 12 Jul 2003 Posts: 22 Location: Rotterdam, The Netherlands
|
Posted: Fri Aug 01, 2003 11:47 pm Post subject: |
|
|
WTF?
I have no sound at all now. I did nothing, really nothing, except installeing sudo (wich works great) and the sound stopped working and I can't get it back working again.
I'm now remerging alsa, but I'm affraid it won't help. Al settings are still the same and the permissios are correct, but if I do:
Code: | marcel@haldir marcel $ ls -l /dev/snd/
ls: /dev/snd/controlC0: Permission denied
ls: /dev/snd/timer: Permission denied
ls: /dev/snd/hwC0D0: Permission denied
ls: /dev/snd/midiC0D1: Permission denied
ls: /dev/snd/midiC0D0: Permission denied
ls: /dev/snd/pcmC0D3p: Permission denied
ls: /dev/snd/pcmC0D2c: Permission denied
ls: /dev/snd/pcmC0D1c: Permission denied
ls: /dev/snd/pcmC0D0p: Permission denied
ls: /dev/snd/pcmC0D0c: Permission denied
total 0
marcel@haldir marcel $
|
even if the user marcel is the owner of the devices, KDE gives the can't open /dev/dsp error and nothing works, no sound at all
who knows what's going on? removing sudo didn't work _________________ GNU/Linux is userfriendly, it's just very picky about who its friends are.
Use GPG! marceldereus@nedlinux.nl
Use Jabber! marceldereus@jabber.org |
|
Back to top |
|
|
RosenSama Tux's lil' helper
Joined: 28 Apr 2003 Posts: 99
|
Posted: Sat Aug 02, 2003 4:49 am Post subject: |
|
|
Sorry Marcel, I know this is your thread, but I want to ask questions about your original issue and this seems to be the best thread on the topic. I have the same symptoms of wpb44 and it seems others do to, from the other threads posted around the board. A quick summary w/ maybe a couple new factoids:
- kernel 2.4.20-gentoo-r2
- sound driver emu10k1 (compiled as module)
- using gdm
- devfsd.conf sets audio devices to root.audio w/ permission 660
- from boot until the first non-root login, permissions in /dev/sound and /dev/snd are as set in devfsd.conf
- when any non-root user logs in either to a console OR an X session the audio device permissions are changed to <user>.audio w/ permission 600
- when that user logs out the devices return to root.audio, but remain permissioned 600
- I can reproduce this into the console, gnome, or fluxbox and from other posts it seems to happen in openbox and kde, too
I'm looking for a pointer to where else this might be happening. It seems to have something to do with login/logout in general and not a particular desktop environment or window manager. I've grep'd the /etc/ directory for mentions of sound and found nothing. Any ideas to avoid the repetitive chmod required to do this?
I just want to have login and logout leave the permissions unchanged and I'm at the end of my Linux knowledge. |
|
Back to top |
|
|
Marcel de Reus n00b
Joined: 12 Jul 2003 Posts: 22 Location: Rotterdam, The Netherlands
|
Posted: Sat Aug 02, 2003 11:21 am Post subject: |
|
|
It's also a mystery for me. It's not a hardware prob, under Knoppix works the sound fine.
I can't get the sound working again, tried everything. I really considering reinstalling Slackware, because music is my live and I really get sad if I can't listen music _________________ GNU/Linux is userfriendly, it's just very picky about who its friends are.
Use GPG! marceldereus@nedlinux.nl
Use Jabber! marceldereus@jabber.org |
|
Back to top |
|
|
minimizebeefgoo Tux's lil' helper
Joined: 24 Jul 2003 Posts: 149 Location: MI, USA
|
Posted: Sat Aug 02, 2003 4:41 pm Post subject: |
|
|
Go into /etc/security/console.perms and change Code: | <console> 0600 <sound> 0600 root.audio | to Code: | <console> 0660 <sound> 0660 root.audio | This will make the permissions for the audio devices stay 660 when someone logs in and will make sure they don't revert to 600 when they log out.
At least, this worked for me . |
|
Back to top |
|
|
|