Page 1 of 1

suexec and include files

Posted: Sat Jan 03, 2009 12:10 pm
by alex.barylski
I'm curious, when a script runs under suexec, say as user root...

When that instance of the application includes other PHP scripts, which are of user 'apache' do those scripts run under root or apache?

Basically I'm curious as to whether I could run a index.php script as user 'something' and include other files under the user 'apache' and not worry about the included script files having the same access privies as the primary invoked script.

Cheers,
Alex

Re: suexec and include files

Posted: Sat Jan 03, 2009 2:04 pm
by Eran
The files might be owned by any user, they will be run as the user declared for the suexec. If you run it as root, then all includes will be run as root as well.

http://httpd.apache.org/docs/2.0/suexec.html

Re: suexec and include files

Posted: Sun Jan 04, 2009 2:46 pm
by alex.barylski
Thats what I figured...doh! Ah well...