无法向Windows容器上的IIS_IUSRS授予权限

时间:2019-12-27 10:19:51

标签: windows containers windows-server-container

我正在构建由microsoft/aspnet和构建器OS制作的图像:

C:\> systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name:                   Microsoft
OS Version:                10.0.17763 N/A Build 17763

,运行RUN icacls 'C:\inetpub\wwwroot\' /grant 'IIS_IUSRS:(F)'

后出现错误
  

无效的参数“'IIS_IUSRS:(F)'”
  命令'cmd / S / C icacls'C:\ inetpub \ wwwroot \'/ grant'IIS_IUSRS:(F)''返回非零代码:87


但是在microsoft/aspnet和构建器操作系统制作的基本映像下

PS C:\> systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name:                   Microsoft
OS Version:                10.0.18362 N/A Build 18362

完全可以,有人知道为什么吗?

1 个答案:

答案 0 :(得分:2)

您的密码还可以,但是非常小错 尝试这个 icacls'\ inetpub \ wwwroot \'/ grant“ IIS_IUSRS”:f 希望你的问题能解决。