Can't grant permission to IIS_IUSRS on windows container

1.3k views Asked by At

I'm building a image, which was made by microsoft/aspnet and builder OS:

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

, I got error after running RUN icacls 'C:\inetpub\wwwroot\' /grant 'IIS_IUSRS:(F)'

Invalid parameter "'IIS_IUSRS:(F)'"
The command 'cmd /S /C icacls 'C:\inetpub\wwwroot\' /grant 'IIS_IUSRS:(F)'' returned a non-zero code: 87


But under the base image which was made by microsoft/aspnet and builder OS

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

Was totally OK, anyone knows why?

1

There are 1 answers

2
Inamul Hasan On BEST ANSWER

Your codes are okay but a very lil mistake Try this icacls '\inetpub\wwwroot\' /grant "IIS_IUSRS":f Hope your problem will solve.