(These directions are for OSS, either the Old Sound System or ALSA's emulation of it. Most modern distros do it differently, and have a different way of enabling users to play or record sound.

First, check if /dev/dsp and /dev/mixer already have a group, maybe named audio or sound or similar. If they do, just add yourself to that group (skip down for info). Else, you need to set this up ourself. Read on:

First, create the group "sound" (Or, "audio" if you prefer. The devfs directory is named sound, which is why i use sound.):

groupadd sound

Then make sure your sound-devices belong to group sound:

chgrp sound /dev/dsp* /dev/mixer*

Then make sure the owner and the group can read and write those devices, and no-one else:

chmod 660 /dev/dsp* /dev/mixer*

Then add your sound-users to group sound.

EDITOR=emacs vigr

or something like

for user in kreiger foo bar; do
  usermod -G `id -Gn $user|sed "s/ /,/g"`,sound $user
done

If you're using devfs, add the following line to /etc/devfsd.conf:

REGISTER        ^sound/.*       PERMISSIONS     -1.sound        0660

This will set the correct permissions for the sound devices at startup.

History: linux sound-permissions