Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've installed PHP5 (FastCGI) on IIS6 and is just wondering which windows user PHP uses to access the file system?

With ASP.NET for example, the ASPNET account is used to access the file system. But how about PHP?

I've read some post that suggest it uses the anonymous (i.e. IUSR) account. But isn't it a security breach if I give write access to the IUSR account?

Thanks!

share|improve this question
add comment

3 Answers

Craig is right, the default for IIS6, will be running as the NETWORK SERVICE account; using PHPinfo in a test.php is a great way to diagnose this.

I blogged about the "identity" of code running in IIS here by OS

Hope that helps.

Dave

share|improve this answer
add comment

I imagine it'll use whatever user you're running the IIS service as. But here's a quick and easy way to find out:

  1. Drop the following lines into a file called test.php: <?php phpinfo(); ?>

  2. Put test.php under the IIS document root and view it in a browser

  3. Look for a line in the output containing the username, it's definitely in there somewhere.

share|improve this answer
add comment

In IIS6 the default worker process user is NETWORK SERVICE. If you open the Task Manager, the w3wp.exe process will likely be running as this account.

Also, the ASPNET user is a carryover from IIS5. Unless you have IIS6 configured to use "IIS5 isolation mode" ASP.NET would also "run" under the NETWORK SERVICE account.

share|improve this answer
add comment

Your Answer

 
discard

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