Re: Restart BIND from a php script
| From: | Tom Rogers | Date: | Mon, 16 Sep 2002 02:32:02 +0000 |
| Subject: | Re: Restart BIND from a php script | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-116483@lists.php.net to get a copy of this message | ||
Hi,
Monday, September 16, 2002, 10:52:37 AM, you wrote:
GH> Not sure how to go about this. I'd like a way to restart bind from a php
GH> script I have.
GH> The biggest problems I have are permission related. Calling exec(),
GH> system() or using popen() all fail due to the permissions. I tried
GH> making a suid bash script that did the same thing and this failed too.
GH> Seems like it failed to set itself suid root while being called from the
GH> php script.
GH> Finally I tried make a suid C prog to restart bind and then calling that
GH> from a php script but that fails too.
GH> Any ideas?
GH> Thanks
GH> Gareth
GH> Ps. My partition is not mounted nosuid either.
If you are using bind version 9 you can use the rndc interface to
restart (as in reload it's config files)
You can then set up the rndc executable with whatever owner your web
server is running as.
--
regards,
Tom