LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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

Reply
 
LinkBack Search this Thread
Old 02-08-2003, 09:36 PM   #1
N_A_J_M
Member
 
Registered: Aug 2002
Location: Whangarei New Zealand
Distribution: Slack 8.1
Posts: 300

Rep: Reputation: 30
Post 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
 
Old 02-08-2003, 10:52 PM   #2
macewan
Senior Member
 
Registered: Jan 2002
Distribution: Ubuntu, Debian
Posts: 1,055
Blog Entries: 1

Rep: Reputation: 45
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.
 
Old 02-08-2003, 11:25 PM   #3
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 55
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.
 
Old 02-09-2003, 01:24 AM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86; Gentoo PPC; Gentoo Sparc64; FreeBSD; OS X; Solaris
Posts: 3,731
Blog Entries: 4

Rep: Reputation: 63
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.....
 
Old 02-09-2003, 03:33 AM   #5
N_A_J_M
Member
 
Registered: Aug 2002
Location: Whangarei New Zealand
Distribution: Slack 8.1
Posts: 300

Original Poster
Rep: Reputation: 30
nice one guys!! no i have it all sussed thanks for taking your time to explain to me
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why "permission denied" though chmod 666? baosheng Linux - Networking 12 10-10-2005 11:40 PM
Scary: ISO-8859-1 and 666 primo General 2 08-28-2005 04:49 AM
Cannot set chmod for directory to 777 or 666 q.sa Linux - Software 6 07-19-2005 09:36 AM
did chmod 666 on a directory but it doesn't work r3dhatter Linux - Newbie 6 06-10-2005 10:06 AM
666 furfurdemon666 LinuxQuestions.org Member Intro 2 04-18-2004 09:30 PM


All times are GMT -5. The time now is 02:36 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration