Ok, another question...I have a script that has to run as root, since it does certain things like restart apache, etc. However, it also needs to start a another program that should run as a user, since running it as root seems a bad idea (it is a server program, and I want to make sure if someone exploits some vulnerability in it they can only do so much damage).

I can't do an "su" within a script, that doesn't work....is there any way to tell the OS to run the program as a non-root user?

I wrote the program that will be running, so I suppose a possibility is to change the user internally to the program, if that is possible, but I don't know that either. (it is written in C/C++)