chmod in .ebextensions on AWS Elastic Beanstalk failing

Viewed 2688

I'm trying to automate the setup of my Symfony2 Application using the .ebextensions *.config files but its failing when I try to execute a chmod. This is my first time on AWS so I've hit a bit of a wall

Here is the config of my symfony.config file in .ebextensions:

container_commands:
  01_chmod_cache:
    command: chmod -fR 777 /var/app/current/app/cache
  02_chmod_logs:
    command: chmod -fR 777 /var/app/current/app/logs
  03_db_migrate:
    command: php /var/app/current/app/console doctrine:schema:update  --env=prod --force
  04_update_assets:
    command: php /var/app/current/app/console assetic:dump --env=prod --no-debug
  05_clear_cache:
    command: php /var/app/current/app/console cache:clear --env=prod --no-debug

I can run all of those commands on CLI when I ssh in. When I review the logs I get the following which isn't very helpful Error occurred during build: Command 01_chmod_cache failed

I think it might have something to do with the user thats executing commands but I don't know where I can configure this

Can anyone assist ?

Cheers.

1 Answers
Related