Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 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?

share|improve this answer
    
Possible if you could write down the codes in line 22? –  Vicky Nov 10 at 4:51

Your Answer

 
discard

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.