IIS8.5: PHP/Wordpress rights to write filesRSS

1 reply

Last post Apr 20, 2017 09:06 AM by Yuk Ding

  • IIS8.5: PHP/Wordpress rights to write files

    Apr 20, 2017 06:57 AM|Irgendware|LINK

    Hello IIS Community
    I am running a Windows Server 2012 R2 Server, which is Hosting several ASP.NET site and two wordpress sites.
    The PHP Version is 5.6.20

    When we are trying to install a plugin or an update we get an error e.g. like 
    "Warning! Could not update D:\Websites\...\wp-config.php!"

    So far I configured each site to use its own application pool using this manual:
    https://www.iis.net/learn/application-frameworks/scenario-build-a-php-website-on-iis/configuring-step-3-configure-php-application-security
    And I gave read and write Access to the apppool user, as I would do with an ASP.NET Website, too.

    In phpinfo I am seeing now the correct Appool ID is used in variable APP_POOL_ID.
    Whats a Little bit strange is that USERNAME is COMPUTERNAME$ instead of IIS Apppool\Apppoolname

    So I made a test and created a new file using fopen, there I see the owner of the file is IUSR.

    My question:

     - So does it mean my site is running as IUSR instead of Appool User?
     - How can I achieve using the Appool user in PHP?

    Thanks for any help


    Mark

  • Re: IIS8.5: PHP/Wordpress rights to write files

    Apr 20, 2017 09:06 AM|Yuk Ding|LINK

    Hi Irgendware,

    So does it mean my site is running as IUSR instead of Appool User?

    IUSR is the authenticated identity for you to access the website. Apppool identity host the worker process and responsible for loading the web application.

    - How can I achieve using the Appool user in PHP?

    If you need to change IUSR to apppool user, you could open IIS manager->site node->configuration editor->system.webserver/serverruntime->authenticated user override->useworkerprocessuser..

    https://www.iis.net/configreference/system.webserver/serverruntime

    Best Regard,s

    Yuk Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.