Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-08-2003, 09:36 PM
|
#1
|
|
Member
Registered: Aug 2002
Location: Whangarei New Zealand
Distribution: Slack 8.1
Posts: 300
Rep:
|
chmod 666
I was just trying to work out howto give all my users (ie: me) the permissions to use my sound card, so that when i startx i dont get some dsp errors. and i came across something like this quite a bit:
Also you will want to chmod 666 /dev/dsp* /dev/mixer* so other users have permissions for sound besides root.
this is really stupid, but i have to find out somehow, why 666 ??? I have read a bit about, but its a bit confusing and vague! i realise that 666 is derived from adding up the permissions ie:read write and so on (400, 200 etc)
but can anyone explain exaclty what permissions are given here? and their corresponding numeric values?
also why is numeric form used here rather than symbolic? is there a general rule of thumb of when to use either symbolic or numeric?
cheers
|
|
|
|
02-08-2003, 10:52 PM
|
#2
|
|
Senior Member
Registered: Jan 2002
Distribution: Ubuntu, Debian
Posts: 1,055
Rep:
|
let us assume that the user for this system is "najm" - with this in mind we will go through three steps.
1. open an xterm window
2. type the letters "su" and then hit the enter key. you will get a prompt for the root password. type in your root password and hit the enter key.
3. type this:
adduser najm audio
and hit the enter key
///////////////
log out then log in again.
|
|
|
|
02-08-2003, 11:25 PM
|
#3
|
|
LQ Addict
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704
Rep:
|
Well there is no rule of choosing octal or "symbolic" form of setting permissions, well, I use octal b/c it makes easier for me to get perms right, I don't know maybe a+r u-w isn't appealing to my eye, and I really struggle sometimes to get the idea when I see that sort of chmod directive.
If you search here there was quite a discussion with explanation of different sets of permissions, basically there are three access rights within three groups, these are owner, group, and others and the actual permissions are read, write and execute, also there are special sets of permissions like sticky bit, set uid (user id), and set gid (group id), the former is used on your /tmp directory where all the users are have read/write access, but only the owner and root only have rights to delete their own stuff; the later two are used when you usually as a sysadmin'd like to give users more air but limit them from use of su which gives up root's password, or you have different groups on your system and you need to have some way to give rights to members to have access to certain files that belong to different group/user but not in its turn to give everything away, so you set up set uid and set gid bits. Example of it is /bin/su.
Last edited by neo77777; 02-08-2003 at 11:27 PM.
|
|
|
|
02-09-2003, 01:24 AM
|
#4
|
|
Senior Member
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86; Gentoo PPC; Gentoo Sparc64; FreeBSD; OS X; Solaris
Posts: 3,731
Rep:
|
4 = read permission
2 = write permission
1 = execute permission
owner : group : everyone
000 : 00 : 0
just add the permissions
so:
666 = read (4) + write (2) for owner,group and everybody. When you ls -l it would look like:
-rw-rw-rw-
755 would be:
read (4) + write (2) + execute (1) owner
read (4) + execute (1) group and everyone
When you ls -l it would look like:
-rwx-r-xr-x
754 would be:
read (4) + write (2) + execute (1) owner
read (4) + execute (1) group
read (4) everyone
When you ls -l it would look like:
-rwxr-x--x
etc etc.....
|
|
|
|
02-09-2003, 03:33 AM
|
#5
|
|
Member
Registered: Aug 2002
Location: Whangarei New Zealand
Distribution: Slack 8.1
Posts: 300
Original Poster
Rep:
|
nice one guys!! no i have it all sussed  thanks for taking your time to explain to me 
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:36 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|