LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Question about Audio in Slackware. (https://www.linuxquestions.org/questions/slackware-14/question-about-audio-in-slackware-462940/)

jstephens84 07-11-2006 08:19 AM

Question about Audio in Slackware.
 
Can anyone tell me why I had to add my user account to disk to be able to play audio? And why does linux default to turning everything all the way down and muting it?

FreeDoughnut 07-11-2006 10:03 AM

Quote:

Originally Posted by jstephens84
And why does linux default to turning everything all the way down and muting it?

So when you hear music you don't jump out of your skull.

bsdunix 07-11-2006 11:17 AM

Quote:

Originally Posted by jstephens84
Can anyone tell me why I had to add my user account to disk to be able to play audio?

Security and file/device permissions. Until you added the "Disk" group to your user account, your user account didn't have the permissions necessary to access the the sound device. As an example:

$ ls -l /dev/cdrom
lrwxrwxrwx 1 root root 8 2006-07-09 18:12 /dev/cdrom -> /dev/hdc
(NOTE: this points to IDE device hdc)
$ ls -l /dev/hdc
brw-rw---- 1 root disk 22, 0 2002-06-09 15:27 /dev/hdc
(NOTE: owner 'root' and group 'disk' can read/write to the disk)
$ id
uid=1000(bsdunix) gid=100(users) groups=100(users)
(NOTE: my user account is assigned to group 'users', so in this case my user account doesn't have the permissions necessary to access the drive)

If this seems a bit complicated, then here's a knowledge article:

"File Permissions and the chmod/chgrp/chown commands"

http://www.freeos.com/articles/4440/

jstephens84 07-11-2006 01:14 PM

I understand permissions just fine. Do they deny the user access to the cdrom by default as a security measure?

edit: Sorry just reread you post and understood better and saw that you did say it was for security.

OdieQ 07-12-2006 06:30 AM

To mount a cdrom and read the files on it, you do not need read or write permissions on the cdrom device, as the mount command has root priviledges (suid).

However, to play audio you need write access to control the cdrom. Read access is not needed, as the audio is sent via an analogue cable from the cdrom to the soundcard. For making a digital audio copy (i.e. ripping), you also need read access.

The reason these access levels are not granted by default is that full access to the cdrom device enables a user to bypass any file system security settings on inserted discs. CD-ROM's typically contain iso9660 file systems with no owner or permission data on them, but could also contain RockRidge or other file systems where this matters.


All times are GMT -5. The time now is 01:03 AM.