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 have a hyper-v server with 3 instances running under it, testing, production, and files. The production user can access the mounted files directory with the following permissions; 'read & execute', 'list folder contents', and 'read'. The testing server's user has the same permissions but can't read them.

The error in my PHP logs is

[09-Mar-2012 06:40:07] PHP Warning: file_get_contents(\\Web\Data\files\thumbs\img123.png) >[function.file-get-contents]: failed to open >stream: Permission denied in C:\inetpub\wwwroot\testing\test.php on line 2

My PHP script is

$jpg = file_get_contents('\\\Web\Data\files\thumbs\img123.png');

Are there other settings I'm missing? The PHPInfo says the username is 'test1$'; could the IIS be trying to access the files as a different user?


share|improve this question

Take a look at the settings for:

  • The Application Pool Account - this might be set to run as a different user

  • The Authentication -> Anonymous -> Settings (if you're using anonymous authentication)

  • Authentication settings in general if you're expecting the user to authenticate and this to then happen on behalf of the user.

You mentioned "mounting" which could indicate that impersonation is being attempted and failing (which would cause the App Pool account's network identity to be used; that'll probably work out to being Test1$/the computer account, in most cases).

share|improve this answer

Your Answer


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.