I have a php script on a Windows Server 2008 box (IIS 7) that is run periodically to download a remote XML file and store it on the server. This script (which previously used to run successfully), is now failing with the following error:
Warning: fopen(C:\inetpub\wwwroot\alan\html\xml) [function.fopen]: failed to open stream: Permission denied in C:\inetpub\wwwroot\alan\html\helpers\weather_proxy.php on line 22
If it matters at all, the only change that I have made was to switch this directory (everything under
alan) to be a checked out copy of a Git repository.
I have tried or checked the that:
- Directory/file permissions--I've gone so far as to give full control to Everyone, starting at c:\inetpub\wwwroot\alan`, and working all the way down to the file itself in case permissions were not being inherited properly. For what it's worth, this includes the script itself, as well.
- Safe mode is disabled.
Am I missing something? The reason that I mentioned the Git checkout is that if I open a Git shell in this directory, it reports
-rw-r--r-- as the effective permissions for the file to which I am attempting to write.
chmoding this file does nothing, according to the bash
ls readout, but the permissions according to the Windows File Properties dialog report that Everyone has Full Control permissions. Am I missing something obvious?
EDIT: I should point out that this error occurs both when running the script interactively at the command line, as well as through the web server.