Container File Permissions in Windows Container

Unclear why, but cacls doesn't seem to be working when run as part of building the container. Switched to using icacls, and was able to grant the IIS_USRS permissions on the folder.

Line added to dockerfile:

RUN icacls 'C:\inetpub\wwwroot\App_Data' /grant 'IIS_IUSRS:(F)'


I can't comment as I don't have enough reputation, but if the answer by @Darendal doesn't work (which it did not for me), then try this syntax

RUN icacls C:\inetpub\wwwroot\App_Data /grant "BUILTIN\IIS_IUSRS:(OI)(CI)F" /t