exec as root
Posted: Wed Jul 10, 2002 9:06 pm
Hi there,
I am just starting out some php programming, with some c experience.
I am attempting to build a web interface for some common unix administration tasks, but while apache runs as user 'nobody', the commands can't get executed due to lack of root privilege.
The only way I could get it to work is by dumping the dynamic command into a file, logging on as root to the console and executing it.
I do have an idea, but it is a little far fetched. One question is, how do I output a string to a file so that the filename will never be the same. (ie. increment ++ the filename, so php will recognize the last filename output?) eg. file00001, file00002
If someone has some ideas, please help!
knight
I am just starting out some php programming, with some c experience.
I am attempting to build a web interface for some common unix administration tasks, but while apache runs as user 'nobody', the commands can't get executed due to lack of root privilege.
The only way I could get it to work is by dumping the dynamic command into a file, logging on as root to the console and executing it.
I do have an idea, but it is a little far fetched. One question is, how do I output a string to a file so that the filename will never be the same. (ie. increment ++ the filename, so php will recognize the last filename output?) eg. file00001, file00002
If someone has some ideas, please help!
knight