Click to See Complete Forum and Search --> : User access to Sound
Nekopa
10-06-2001, 08:13 AM
Hi All!
I am trying to figure out how to access my CD drive to play music CDs when I am logged in as a user, as opposed to root. I think there was a post here somewhere about it "Root to Sound" but I couldn't find that thread. I tried to follow another post about sound problems, and it suggested running modprobe <soundmoudlename> and a bunch of other stuff to set up user access to sound and such. But it didn't work for me. I *think* it didn't work because I recompiled my kernel to include sound, so it wouldn't show up as a module (is this right?). Actually lsmod doesn't show anything at all. But my system is running lovely, but I can only get full access to all the bells and whistles if I am logged in as root.
What should I do? Or where can I find the info I need? A good explanation of user permissions would be nice, as I feel that this is where my problem lies, but being new to linux, I have no idea about the whole permission stuff. The man pages for all the chage stuff, ie chmod, start off with the premise that you know all about the concept behind a permission based system. Where can I get basic info about this stuff
Thanks in advance for ANY pointers, as I think this is something that is essential in linux, and I need to learn it.
Lee
bdg1983
10-06-2001, 10:04 AM
As root, try
chmod 666 /dev/dsp
and then try the sound again as user.
Post back with the results and if it still doesn't work, we can try something else.
The NHF's would be a good place to start as there is one on permissions among many others that would help you. www.linuxdoc.org (http://www.linuxdoc.org) has all the how-to's though most of them will be installed with your distro. Use your filemanager to look around your filesystem and you will be surprised on the amount of documentation included with every distro. Remember to use the manual pages ( man commandname ).
Nekopa
10-06-2001, 10:33 AM
Thanks!
The advice you gave me didn't work, but upon looking at the error I got trying to use the sound player, I realized that I didn't have permission to access the cdrom. So I used the same command with /dev/cdrom and now I can play music! :D
What I was referring to in my first question was some kind of reference on permissions in unix per se. I.E. I can't find a NHF that talks about the concept behind permissions, and what they are all about. I saw on one post that you shouldn't use chmod 666, but set up a group, add users to that group and give that group permission instead. It confused me because I have no framework of group/user concepts to work in. But I know enough from some of the problems I have encountered in Linux to know that group/user is very important (MySql shows up as a user on my KDM login and noone at my house is called MySql ;) ) So where can I start to learn about this stuff. It doesn't have to be newbieized so to say, but it does have to start from the idea that I have never encountered groups/users before. Once I understand it *I* will write an NHF on it for others, but at the moment it seems like something that should be common knowledge, but alas not for me :(
But thankyou for allowing me to listen to music without having to be root (as I have learned the hard way not to log in as root unless I have to do something serious, and su followed by exit is my friend now :) )
Lee
xhadow
10-06-2001, 12:10 PM
its easy,
the file permission read/write/exec is in the octal format (0-7), but actualy its binary all you have to know 1=on 0=off
for example
permission links owner group
drwxr-xr-x 26 root bin
111101101
7 5 5
user group others
about the user/group
let's say that your /dev/cdrom belongs to group disk
you can invoke the command adduser <user> disk as root, it will add that specific user into the disk group so that the user can read/write/ex depend on the permission of the file
alternatively you can edit the /etc/groups file and just add the user into whatever group you want
hope this help :)
[ 06 October 2001: Message edited by: xhadow ]
Nekopa
10-06-2001, 12:39 PM
Okay......
I still have no idea about the whole group/user thing... But I think I have a handle on *what chmod does. Correct me if I am wrong:
chmod 666 /dev/cdrom
6 6 6
User Group Others
110 110 110
| | |
| | >Others can read, write
| >Peeps in the group can r,w,
> The user can read, write but not execute
So I gather that 7's in a chmod can only be used if the file in question is a binary or executable, And is 666 dangerous because it give access to anyone, whereas 660 would only allow the user and his group, but no-one else to read and write to the file? Also, seeing as the device I had the problem with is a CD-ROM would the command chmod 444 work, as I only need to be able to read from the device, not write to it.
Thank you for your explanation, I think I am on the road to learning about this group/user thingy :D
Lee
xhadow
10-06-2001, 09:38 PM
yupe, your on the right track there :)
and for cdrom if im not mistaken the default permission is 640, you can try to set the permission 444, but your CDROM is already a read-only device, even you set it to 777 you wont be able to write :D.
you better do search in the hardware related forum, theres a couple discussion about the user/group thingy, or use google (http://www.google.com)
Nekopa
10-06-2001, 09:44 PM
Thanks for the info folks!!!
:D
Lee