Executing external program (user/group problem)

From: Date: Fri, 14 Jul 2000 14:04:46 +0000
Subject: Executing external program (user/group problem)
Groups: php.general 
Request: Send a blank email to php-general+get-6639@lists.php.net to get a copy of this message
This might be a bit more general and not just related to php. From a web page, I'm trying to execute a script on my linux server with help of PHP (using the system("script") function) Problem is that the script executes a few programs/scripts which can only be run as root. I could change the user/group that my web-server is running as to root (but that wouldn't be a very good solution). So what can I do? Is it possible to have a script change user/group when running.. I could either make a new script which would execute the first script or the script could change the user/group it's running as. Or is there some other way to do this? I'm not sure where to start to look for info about this. So I would appreciate it if anyone could point me in the right direction also. I guess the scripts are basic shell scripts (first line is #!/bin/sh) Maybe I should go and find a book on this... -ouch :) Erlend Stromsvik

« previous php.general (#6639) next »