Yii2/PHP/IIS7 - URL Rewrite and File Permissions (Pretty URL issue) Yii2/PHP/IIS7 - URL Rewrite and File Permissions (Pretty URL issue) php php

Yii2/PHP/IIS7 - URL Rewrite and File Permissions (Pretty URL issue)


In Linux it's quite common that servers run as special user.
I apply this habit even in Windows and it's easy to configure access then for the server.User accounts shouldn't matter then related to the server.
Ownership of all files in the web-directory has to be then the user of the web-server, i.e. "IUSR".
The user as which the server is running has to be adjusted in IIS configuration if it differs from "IUSR" which is the default IIS-user.

Only for file-access related to editing some adjustments might be required for all files but if the server is running as a user it's also clearer that file-access for editing and for server-access are two different purposes. So you even can adjust edit-access to limited files for users, while the server has full access to all files. Giving different access-rights to different users or usergroups is also no problem.

For more details about the default IIS-user you can read Understanding Built-In User and Group Accounts in IIS 7