php Windows Server 2008 R2 / IIS7.5 上缺少 IUSR 帐户

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10033126/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-24 21:11:20  来源:igfitidea点击:

Missing IUSR account on Windows Server 2008 R2 / IIS7.5

phpiis-7.5installationwindows-server-2008-r2

提问by Thomas Wright

I've been given the job of installing PHP5.4 on this machine. One of the manual installation steps is to configure the IUSR account to have specific permissions. The problem is, I see the IIS_IUSRS group, but no IUSR account. The only users listed are the Admin user, a Guest account, and a user for the security software. I'm not really the Windows server type, more of a *NIX guy - so this is getting a little frustrating. I've searched everywhere and haven't found a suitable answer, but I have learned a lot about IIS7.5 - so it hasn't been a total waste of time. I've tried several recommendations and found several similar problems, but nothing has worked so far. I've also just tried making the IUSR account myself, but to no avail. If anyone knows how to get this going, I will be ever so grateful.

我得到了在这台机器上安装 PHP5.4 的工作。手动安装步骤之一是将 IUSR 帐户配置为具有特定权限。问题是,我看到了 IIS_IUSRS 组,但没有 IUSR 帐户。列出的唯一用户是管理员用户、访客帐户和安全软件的用户。我不是真正的 Windows 服务器类型,更像是一个 *NIX 人 - 所以这有点令人沮丧。我到处搜索并没有找到合适的答案,但我已经了解了很多关于 IIS7.5 的知识 - 所以这并没有完全浪费时间。我尝试了几个建议并发现了几个类似的问题,但到目前为止没有任何效果。我也尝试过自己创建 IUSR 帐户,但无济于事。如果有人知道如何实现这一点,我将不胜感激。

回答by Thomas Wright

After several hours of trying to figure this one out, I finally did. So, for anyone who may come across this same issue, here is the answer.

经过几个小时的尝试解决这个问题,我终于做到了。因此,对于可能遇到相同问题的任何人,这里是答案。

This is where, and how, I found the IUSR.

这就是我在哪里以及如何找到 IUSR。

First, let me explain that I'm not sure what the particular settings and/or setup is which caused the IUSR to be hard to find on my system. However, I DID find it, so here it is: I right clicked on the folders/files of which I needed to give access to IUSR, and selected 'Properties'.

首先,让我解释一下,我不确定导致 IUSR 在我的系统上难以找到的特定设置和/或设置是什么。但是,我确实找到了它,所以它是:我右键单击需要访问 IUSR 的文件夹/文件,然后选择“属性”。

Click on the 'Security' tab => 'Edit' (under groups and users) => 'Add' (under groups and users)

单击“安全”选项卡 =>“编辑”(在组和用户下)=>“添加”(在组和用户下)

This brings you to the 'Select Users, Computers, Service Accounts, or Groups' window.

这会将您带到“选择用户、计算机、服务帐户或组”窗口。

Click on the 'Object Types...' button and just select everything and hit 'OK'.

单击“对象类型...”按钮,然后选择所有内容并点击“确定”。

Next, click on 'Locations ...' and select the parent-most option (this will most likely be the server itself) and hit 'OK'

接下来,单击“位置...”并选择最父选项(这很可能是服务器本身)并点击“确定”

next, click on the 'Advanced' button and select the 'Find Now' button.

接下来,单击“高级”按钮并选择“立即查找”按钮。

You will see several search results. Some will be groups and others will be actual users.

您将看到多个搜索结果。有些将是组,而其他将是实际用户。

Within thislist, you will find the IUSR username. Select it, and hit 'OK'.

列表中,您将找到 IUSR 用户名。选择它,然后点击“确定”。

And there you have it.

你有它。

I'm not sure why this happens, however, I suspect (remember, I'm not too savvy with Windows as a server) I suspect it has something to do with using an Active Directory server across all of our servers for authentication and security. The reason I believe this is because the IUSR user is not indicated with the name of the server I am working with even though most, but not all, of the other groups and user names are which were in the Search Results list after hitting 'Find Now'. And that is that. :)

我不确定为什么会发生这种情况,但是,我怀疑(记住,我对 Windows 作为服务器不太了解)我怀疑这与在我们所有的服务器上使用 Active Directory 服务器进行身份验证和安全有关. 我相信这是因为 IUSR 用户没有用我正在使用的服务器的名称表示,即使大多数(但不是全部)其他组和用户名在点击“查找”后都在搜索结果列表中现在'。就是这样。:)

回答by Mikhail

That's because IUSR is not user account but "built-in security principal" - when granting rights to a file or folder, the built in security principal is one of the category of users that can be specified, but it doesn't visible in lusrmgr.msc and can't be added to a group.

那是因为 IUSR 不是用户帐户而是“内置安全主体”——在授予文件或文件夹权限时,内置安全主体是可以指定的用户类别之一,但它在 lusrmgr 中不可见.msc 且无法添加到组中。

And about naming - some old docs still mention account IUSR_MACHINENAME which was in use with IIS 6, but starting from IIS 7 this account renamed to IUSR and no longer tied to machine...

关于命名 - 一些旧文档仍然提到与 IIS 6 一起使用的帐户 IUSR_MACHINENAME,但从 IIS 7 开始,这个帐户重命名为 IUSR 并且不再与机器绑定......

For more details see article "IIS 6 vs. IIS 7 IUSR Accounts"which explain it thoroughly.

有关更多详细信息,请参阅文章“IIS 6 与 IIS 7 IUSR 帐户”,其中对其进行了彻底的解释。

回答by azeem

another trick i found, add the IUSR (which is not visiable in local server users, nether in group), just add IUSR to your IIS root folder and the folder where database is. this works for me.

我发现的另一个技巧,添加IUSR(在本地服务器用户中不可见,在组中不可见),只需将IUSR添加到您的IIS根文件夹和数据库所在的文件夹中。这对我有用。