[Techtalk] "I need to use Windows because ...chmod help

cgay at donslothower.com cgay at donslothower.com
Sat Aug 10 18:16:29 EST 2002

Nope, I'm an utter and total newbie.  It's still in greek to me.  Let me 
try to get clearer on what I need to do...

/dev/null wrote:
> ok.... just cd to the directory and type 

which directory?

> chmod 4755 my_binary
> hope that works okay... 
> you probably know chmod 755 well but the 4 in front of it allows it to be run 
> as if you were root, even though you're logged in as a normal user :)

>>never encountered chmod at all, let alone know what chmod 755means. 
>>What is this, what does it do, am I changing something in my user 
>>abilities, my directory, or the open office stuff?

chmod  This changes the permission on who can read/write or excecute a file.  

Quick permission lesson:

users/groups are allowd to do these things to a file::   read(r), write(w) or execute(x)

This can be set in any combination.  
r, (read)
 rw, (read and write)
 rwx, (read/write/execute)
 r-x (read and execute, cannot write)

also you should see 2 names after the permissions   the first one is the owner of the 
file, the second is the group that owns the file. 

To look at a files permissions do:  ls -la

each file can have these 3 permissions set for owner, group and world   (they are 
always in that order) and should look sort of like this when you run ls -la

-rwxr-xr-x     Permissons are always divided into 3 groups of 3.  
                  : In this case  owner:   can read/write/execute
                                      group   can   read/execute  and same for world

chmod command:

chmod 744 _file_

Each number  poistion represents a different id/group 
the 7 slot  is for the file owner
the middle slot is for the group
and the right slot is for the world   
(same order as ls -la)

How do you get those numbers and what do they mean?

1 =  x
2 = w
3 = wx
4 = r
5 = rx
6 = rw
7 = rwx

1, 2 and 4 are the base numbers.  You just add them together to get multiple 
permissions ona  file.  

so chmod 744   means    rwx for the owner    r for the group and r for the world

if you have 4 posistions in the chomd command this means you are doing 
something special like  doing a setuid.  The first number being the special one. 
setuid gives a user the ability to run a program as if they were root.  

OK  think that's all.  Someone correct me if they see errors.  I'm not sitting at a unix 
box.  HP has my laptop for hardware repair...

man chmod may be of use.  Probably a quick read of a few pages in a book and/or 
creating a few dummy files to play with is a good idea.
Techtalk mailing list
Techtalk at linuxchix.org

All those who wonder are not lost.

More information about the Techtalk mailing list