I run XAMPP (which starts PHP and apache) with this command:

do shell script "sudo xampp start" password "******" with administrator privileges

So I asume it has admin privileges, does PHP get those in a kind of cascading effect?
Because PHP can't create files where there aren't 'other' write permission, but I, as root, can, so if PHP was running as root should be able too.

Is there a way I can check if PHP is running as root, and if not, how can I make it?

link|improve this question

feedback

1 Answer

up vote 2 down vote accepted

All webservers switch to a restricted account (nobody, httpd, www-data) as soon as it can - usually just after binding to TCP ports and reading SSL keys. It cannot go back up. PHP-CGI never gains admin privileges.

Besides, who in their right mind would give root to a web page? Current attacks are already bad enough.

link|improve this answer
Yeah, sounds right. – Petruza Nov 20 '10 at 10:22
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.