Php – IIS 7 with PHP in Domain with Windows Authentication

active-directoryiisPHPwindows-server-2008

I have Windows Server 2008 R2 x64b installed with IIS 7, PHP 5.5.

This server is added to domain exampledomain , so I have win authentication enabled and all others disabled. I left the two default providers NTLM and negotiate, I granted IIS_IUSRS read access to wwwroot.

So far it has worked for me only as I am added to the Administrators group which has read/write access to wwwroot folder.

Yet, when someone else is trying to connect, he gets a credentials window and when he puts the domain name and password he cannot get access to the page.

The issue is solved when I add read permission to "Domain users" – then all works fine.

BUT. My issue is that if one opens windows explorer and types \\servername\wwwroot one can see the files and read them. I have never configured IIS before so I know I miss some really important thing. How can I solve the file visibility problem?

Best Answer

It's unclear why your "wwwroot" folder is shared with Windows File and Print Sharing (the service that is allowing you to access the server's hard disk drive with the UNC path \\servername\wwwroot). It doesn't need to be shared with Windows File Print Sharing for IIS to server an application out of that directory.

If the server is something that predates you then there may be some reason in the past and you should probably go digging for documentation.

If you want to live dangerously, remove the "Sharing" from the "wwwroot" folder. An easy way to do that is to right-click the folder in Windows Explorer, go to the "Sharing" tab, and disable sharing. (Depending on whether you left UAC enabled you may have to elevate.)