The figures are calculated in the following way
for the owner
400 has read rights
200 has write rights
100 has execute rights
for the group
40 has read rights
20 has write rights
10 has execute rights
for everyone else
4 has read rights
2 has write rights
1 has execute rights
so lets say chavez wants his file gold to hav read and write rights for
the owner and only read rights for the group and also only read rights for
everyone else he would set his permissions in the following way:
400 + 200 = 600
40        = 40
4         = 4
so you add them up it comes to 644 so then he would run
chmod 0644 gold
If you want the program to run suid i.e runs under the id of the person
who owns it then the mode is 4000 if you want it to run sgid i.e under the
group id of its group owner you then add 2000
so lets say the above file is to be suid then he would have run
chmod 4644 gold
However do not use suid and sgid programs they can be a really big
security hole especially if they are owned by root.
 On Wed, 5
Jul 2000, Peter wrote:

> Date: Wed, 05 Jul 2000 17:49:15 +0800
> From: Peter <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Chmod
> 
> 
> 
> >Hi folks.
> 
> >How can I get the different figures for chmod ??.
> 
> >Or maybe better how do I calculate the figures ??.
> 
> >Regards Erik.
> 
> Read page 115 of running Linux by Matt Welch et all, O'Reilly. It's very well 
> explained there. It's worth bying the book if you really want to understand 
> Linux.
> 
> Peter
> 
> 
> 
> 
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to [EMAIL PROTECTED]
> Please read the FAQ at http://www.linux-learn.org/faqs
> 

 Noah
[EMAIL PROTECTED]
 



-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to