Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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