Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .