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

Kathryn Andersen kat_lists at katspace.com
Sun Aug 11 11:43:10 EST 2002

On Sat, Aug 10, 2002 at 02:16:50PM -0700, Suzi Anvin wrote:
> 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?

The directory in which the program executable file resides which you
wish to change to be suid root.
(You'll need to be root when you do it, too)
> >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 755 means. 
> What is this, what does it do, am I changing something in my user 
> abilities, my directory, or the open office stuff?

You are changing something in the open office stuff.  Chmod is short for
CHange MODe.  Anyway, it changes file access permissions.
If you have ever done an "ls -l" then the first bit of the long list of
files is the type-and-permissions bit, like so:

-rw-------    1 kat      users        3152 Dec 12  2001 worm2.txt
-rw-r--r--    1 kat      users        5812 Jun  4  2000 xfonts

The first character - is the type of file (if it were a directory it
would be "d" for example; in this case it's just an ordinary file).
The next nine characters are the file access permissions.  They are in
three groups - user, group, and other.  Each clump is three letters,
one for Read permission, one for Write permission, and one for eXecute

In the example above, the file worm2.txt can be read and written by the
user (kat); and the file xfonts can be read and written by the user
(kat) and read by the group (users) and read by others (everyone else)
as well.

chmod is the command to change that, and you can define the permisions
symbolically (which is what I usually do cuz it's easier to remember) or
as a set of three octal numbers (one for each group).  That's where the
755 comes in.
The 4775 is for setting the suid bit, that's the first number there in
that clump (4).
(Kathryn stops herself before she gets going on a lecture about octal
and binary numbers...)

What's suid, you ask?  It is a clever thingie which says, hey, when
running this program, pretend I'm the user/group which owns this file.
So suid root means that the program in question runs as if its the root
user (with corresponding powers and permissions).  Setting things to be
suid root is a powerful mechanism, which must be used with caution,
since it also is a security risk (if ever you get cracked).

For fuller information about chmod, do "man chmod" and it will tell you
much more.

Kathryn Andersen
"Hokey religions and old-fashioned weapons
	don't beat a good blaster by your side."
		-- Han Solo	(Star Wars)
 _--_|\	    | Kathryn Andersen	<kat at katspace.com> <http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v	    | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe

More information about the Techtalk mailing list