AWS Elastic Beanstalk上的.ebextensions中的chmod失败

时间:2013-12-04 05:35:57

标签: symfony amazon-web-services elastic-beanstalk

我尝试使用.ebextensions * .config文件自动设置我的Symfony2应用程序,但是当我尝试执行chmod时它失败了。这是我第一次在AWS上,所以我打了一个墙

以下是.ebextensions中的symfony.config文件的配置:

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

当我进入ssh时,我可以在CLI上运行所有这些命令。当我查看日志时,我得到以下哪些内容非常有帮助Error occurred during build: Command 01_chmod_cache failed

我认为它可能与执行命令的用户有关,但我不知道我可以在哪里配置

有人可以帮忙吗?

干杯。

1 个答案:

答案 0 :(得分:6)

也许在命令中添加引号会有所帮助:

container_commands: 
    01_chmod_cache: 
        command: "chmod -fR 777 /var/app/current/app/cache"
相关问题