Hi,
I'm working on a PHP project to manage my linux servers. The basic idea is to have scripts to read/write config files and scripts to start/stop daemons, and other various tasks.
Now, since my apache runs as "nobody", PHP runs as nobody too, which doesn't give me a lot of flexibility.
Now, knowing this project would not be visible from the Internet (behind a firewall and with access rules allowing it to be accessed from my computer only... etc) I was thinking about running a second apache as root (er...) on another port. In another words, I would have 1 apache on port 80 for my web sites, and another one for my PHP management project.
Now, I'm not so stupid (well I hope so...) and I know that running Apache as root is a bad idea, even in such a "protected" environment. Thats exactly why I'm asking for help here. Anyone has any auggestions ?
How should I set things up to make sure my PHP scripts can read/write config files (maybe even files like /etc/passwd), start/stop daemons (like apache, bind, mysql, etc.) and so on, in a fairly secure way ?
Thanks for the hints.
Regards,
Jonathan