Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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'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?


share|improve this question

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.


share|improve this answer

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

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

You need to change in php.ini:

fastcgi.impersonate = 1;

So, PHP uses the same account of your IIS (w3wp.exe) uses. (User: IUSR).

share|improve this answer

Your Answer


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