Jump to content

[function.fopen]: failed to open stream: Permission denied


steveblue

Recommended Posts

Hi,

I am trying to get PHP5 running on Windows 2003 R2 with IIS6 installed. Everything sames to be in order, phpinfo script runs elc. but when I try to install a php script i get the following message:

fopen(c:/Inetpub/wwwroot/config.php) [function.fopen]: failed to open stream: Permission denied

now i know this is a permissions problem, but i'm not to sure how to correct this. What setting in IIS6 do i need to change to fix this??

Thank you

Steve

Link to comment
Share on other sites


What would be a betetr option is to navigate there via the filesystem and set the permissions on that file only.

Most php 'applications' have a set up wich requires the script to access certain files to write to, it is never a good idea to open write access up on the whole website, as certain individuals can then misuse the script and even go as far as upload malicious content to your site.

Review the need for write access on a file to file basis and preferably move those files to a folder that is not shared via IIS (eg outside of the wwwroot folder in your case) sometimes this is not possible and then you will need to restrict access to that file only and not the whole website.

- if it is an installer it may only need access to the file when it is installing, verify and remove write access as soon as possible from the site.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...