SUMMARY:How to make a C program run as root.

From: Peter Tashkoff (
Date: Tue Feb 18 1997 - 18:01:14 CST

The answer is :

1. "chown root filename", then "chmod 4755
If like me, this doesn't work for you then the
chances are the filesystem has been mounted
with -nosuid. (as mine is)

In this case you can ;

2. Include the following in the code.
#include <stdio.h>

This works even with the disks mounted -nosuid.

For providing me with the answers and
clearing up my ignorance on terminology
Thank you very much to
Jafar Shameem
Russ Poffenberger
Frank Pardo <>
Reto Lichtensteiger <>
Eduardo E. Silva <>
Rich Snyder <>
Donn MacCara
Mark Belanger <>
Matthew Stier <Matthew.Stier@MCI.Com>
Rich Casto <>

and anyone else whose mail hasn't arrived yet.

Your assistance is most appreciated.

peter tashkoff

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:46 CDT