IIS permissions for PHP folder

Irfan Ranjha 21 Reputation points
2022-06-27T16:34:13.897+00:00

I'm learning, setting up PHP on IIS server

I installed PHP on C:\PHP folder, for user isolation I created a test web site with a user User1 for Application Pool and same user has access to folder C:\phpRoot\Web1\ where I put all PHP script based pages.

I noticed I have to give permission to folder C:\PHP as well, if I add permissions IIS_IUSRS or IUSR to C:\PHP I can load pages.

I want to know is it ok if I'm managing isolated/separates users (ie User1) for each App Pool and Application Folder, but put only one common user/group IIS_IUSRS for C:\PHP folder permissions?

Windows development Internet Information Services
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yurong Dai-MSFT 2,846 Reputation points Microsoft External Staff
    2022-06-28T09:14:39.047+00:00

    Hi @Irfan Ranjha

    For application pools, you create a separate user user1, then assign that user to each application pool, you need to make sure that user1 also has access to the C:\PHP folder. if you just put only one common user/group IIS_IUSRS for C:\PHP folder permissions, the application pools has no permission to access the php executable file.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,
    Yurong Dai


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.