1

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.

1 Answer 1

1

Doh! It would make sense to try and write to the file (C:\inetpub\wwwroot\alan\html\xml\outfile.xml) instead of the directory (C:\inetpub\wwwroot\alan\html\xml), wouldn't it?

1
  • 1
    Possible if you could write down the codes in line 22?
    – Vicky
    Nov 10, 2014 at 4:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .