title: How to set folder permissions for a particular container on Elastic Beanstalk
body: <p>I have troubles setting permissions for a web folder on Elastic Beanstalk. I run multiple containers using custom docker images in one instance: apache-php, mysql, memcached, etc.. For the container "apache-php" I map a folder with my yii2 application to /var/www/html/. </p>
  
  <p>When I manually make a bundle and do upload / deploy via Elastic Beanstalk console I sure have right permissions for the folder and everything works fine.  </p>
  
  <p>Now, when I deploy the app using "eb deploy", it drops all permissions and I get a server error and "The directory is not writable by the Web process: /var/www/html/backend/web/assets" in logs.</p>
  
  <p>I can connect via ssh and set necessary permissions manually, but sure this is not convenient, since needs to be done every time I re-deploy the app.</p>
  
  <p>So, my questions is what is the best way to automatically set permission for particular folder in particular container on Elastic Beanstalk?</p>
  
  <p>Perhaps, I can use .ebextensions, but I didn't find how to run "container_commands" for particular container.  </p>