locked
IIS7 / PHP / Permissions issue RRS feed

  • Question

  • I am running Vista Home Premium SP1 with IIS7.  It has been working flawlessly to date.

    Recently, I created a simple web page, which uploads images to a folder via <input type="file" />

    I am using PHP 5.2.5 on IIS7.

     

    Folder has my login account name as having Full Control.  To get the File Upload to work, I had to grant modify/write access to the folder for IUSR (also IIS_IUsrs while troubleshooting).

     

    The file transfer works fine and the uploaded file resides in the target folder, the problem is that IUSR has Full Control permission of the uploaded file (as well as SYSTEM and Administrators).  My login account, which has Full Control on the containing folder has not propagated the permissions.  In fact, it is not even listed.  The IIS_IUsrs group is listed in the permissions list, but all checkboxes are unchecked.

     

    I think it has something to do with the fact that the images gets downloaded to a temp folder and moved to the target folder, so the permissions are not propagated from the folder. 

     

    This is really a matter of convenience (and a desire to have a better understanding) than anything else.  To access the images on the web server (through the file system, I have to change to Administrator - just an inconvenience). 

     

    Is there a way to have the permissions propagated other than by doing a copy rather than a move.

     

    I also issued a chmod command in the PHP script giving world r+w+e, to no avail.

     

    Any thoughts would be appreciated.  Thanks in advance.

    Monday, July 28, 2008 3:28 PM

Answers

  • Hi,


    My understanding is that you want the website could be accessed by every user, did I get that right?

     

    To do it, follow the steps below:

     
    1. In IIS, click your Website. Under "IIS", double-click "Authentication".


    2. Right-click "Anonymous Authentication", click "Enable".


    3. Click your website again. Under "IIS", double-click "Authorization Rules".


    4. If there isn't anything, click in the right panel "Actions"->"Add Allow Rule". Choose "All Users".

     

    Thanks.

    Thursday, July 31, 2008 12:41 PM

All replies

  • Hi,


    My understanding is that you want the website could be accessed by every user, did I get that right?

     

    To do it, follow the steps below:

     
    1. In IIS, click your Website. Under "IIS", double-click "Authentication".


    2. Right-click "Anonymous Authentication", click "Enable".


    3. Click your website again. Under "IIS", double-click "Authorization Rules".


    4. If there isn't anything, click in the right panel "Actions"->"Add Allow Rule". Choose "All Users".

     

    Thanks.

    Thursday, July 31, 2008 12:41 PM
  • This problem tormented me for a while.

    With me, it was down to the temp folder, as specified in php.ini

    By default, it will choose c:\windows\temp.

    Allow IIS_IUSRS appropriate permissions for the temp folder and it sholuld solve the problem.
    Sunday, November 23, 2008 12:36 PM
  • Thanks!, that worked for me!
    Wednesday, September 23, 2009 2:18 PM
  • Crush123's suggestion worked for me, but just one thing I had to do to get it to work was an iisreset in a command prompt.
    Tuesday, January 26, 2010 11:12 PM