note 29140 deleted from function.shell-exec by didou

From: Date: Sun, 18 May 2003 04:54:59 +0000
Subject: note 29140 deleted from function.shell-exec by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-48443@lists.php.net to get a copy of this message
Note Submitter: php.net@irradour.co.uk ---- As none of the shell commands allow you to su to root (they cannot open the stream to put in the password for su - tested Redhat Linux 7.1) the only way I found to su to another user to run a command is - assuming apache is your apache user: login as root. chown root:apache myShellScript.sh chmod 777 myShellScript.sh chmod +s myShellScript.sh now when the apache user runs the command, it should automatically setuid to root as it is run, I think.

« previous php.notes (#48443) next »