Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 02-08-2003, 09:36 PM   #1
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?

Old 02-08-2003, 10:52 PM   #2
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
LQ Addict
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
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
Senior Member
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
4 = read permission
2 = write permission
1 = execute permission

owner : group : everyone
000 : 00 : 0

just add the permissions

666 = read (4) + write (2) for owner,group and everybody. When you ls -l it would look like:

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:

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:

etc etc.....
Old 02-09-2003, 03:33 AM   #5
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


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

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 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 Member Intro 2 04-18-2004 09:30 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:56 PM.

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