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


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 and put this in the top level .ebextensions folder in my project. The contents are below:

However while the folder is created successfully the permissions aren’t set. If anyone has any idea what I am doing wrong I would be hugely grateful. Big thanks in advance.


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:

Hope this helps someone else out.

Leave a Reply