How To Set Folder Permissions in Elastic Beanstalk Using YAML File?

前端 未结 3 1414
梦谈多话
梦谈多话 2021-01-05 16:46

I have a C# Web API Elastic Beanstalk app which needs a folder outside the deployment directory that the IUSER and IIS_USERS users can write to. I\'ve created a .config file

3条回答
  •  佛祖请我去吃肉
    2021-01-05 17:21

    In the end I switched to using Json instead of YAML as, despite my YAML being validated by several online YAML testers, AWS still wouldn't accept it. It always had issues with the parameters passed to icacls. I also changed to a folder within the application App_Data folder as setting permissions on any directory external to the application didn't appear to work. So, my final configuration file is as follows:

    {
        "container_commands": {
            "01": {
                "command": "icacls \"C:/inetpub/wwwroot/AppName_deploy/App_Data/AppFolder\" /grant DefaultAppPool:(OI)(CI)F"
            }
        }
    }
    

    Hope this helps someone else out.

提交回复
热议问题