PHPJavascript

Web Development Guide – My Personal Library of Tutorials and Scripts

PHP Reading Writing file error. failed to open stream: Permission denied

September25

I can not upload images and files to my php website. Reading Writing error.

Check Read/Write Permissions.

  1. Go to “Control Panel” – “Administrative Tools” – “Internet Information Services” (IIS)
  2. On the left panel click on “Local Computer” or - “Websites” – “Default Website” – right click on
  3. “Properties” – “Documents” – check “read” and “write”
  4. Click “OK” and close the window
  5. Go the exact location of your website directory which is mostly C:inetpubwwwroot
  6. Right click – “Properties” – “Web Sharing” – select “Share this Folder”
  7. “Edit Alias” window opens – tick “write”
  8. Message comes “Are you sure”. select “yes”
  9. click “OK”

OR

If the above solution doesn”t help than try this solution:

  1. Copy paste your website directory from the root folder (C:inetpubwwwroot) to any other folder
  2. Go to “Control Panel” – “Administrative Tools” – “Internet Information Services” (IIS)
  3. On the left panel click on “Local Computer” or – “Websites” - “Default Website” – right click and select “delete”
  4. Right click on “default websites” – select “New” – “Virtual Directory” – click “next” – Type any name in the “alias” field – give directory location (where you have copy pasted your web directory initially)
  5. Check all options “read”, “run”, “write”, “execute”, “browse”
  6. Message box opens “Are you sure you want to select both these options”. click “yes”
  7. Click “Finish”

posted under PHP
4 Comments to

“PHP Reading Writing file error. failed to open stream: Permission denied”

  1. On September 25th, 2007 at 10:36 am admin Says:

    if you are using linux then just change the folder permissions to 777……..

    All that fuss is windows ONLY

  2. On October 30th, 2007 at 6:39 am Madhu Says:

    If i am using XAMPP OR WAMP Package..How can i set permissions ?

  3. On October 30th, 2007 at 10:56 am admin Says:

    Try the links below

    * http://www.neowin.net/forum/lofiversion/index.php/t587851.html
    * http://www.phpinsider.com/smarty-forum/

  4. On March 30th, 2008 at 10:57 am admin Says:

    I tried to set permissions using the above settings and it always works. But once i was trying to install oscommerce and could not write or modify files. Hence the installation was giving me a hard time (these things always happens with IIS they say apache is the best).

    Anyways the following worked for me:

    I selected the directory where the files to be written existed.

    Right Click – “All Tasks” – “Permission Wizard” – “Inherit of Security Settings” – “Replace all directory and file permissions” – Next – Next

    Note at “Replace all directory and file permissions” you should have the following settings listed:

    —————————————————————
    Administrators have full access to files
    Everyone can read files
    Everyone can write files
    Everyone can execute file
    —————————————————————-

    Note: I was installing oscommerce on my local computer so no security hassles if you are doing it online things might be a little different.

Email will not be published

Website example

Your Comment:

 

12,831 spam comments
blocked by
Akismet