【发布时间】:2021-03-11 11:16:00
【问题描述】:
我正在尝试在我的应用程序部署到 AWS 后运行脚本。但是每当我在部署后尝试运行脚本时,它都会出现权限错误。
[RunAppDeployPostDeployHooks]。停止运行命令。错误: 命令 .platform/hooks/postdeploy/99_start_script.sh 失败 错误 fork/exec .platform/hooks/postdeploy/99_start_script.sh: 权限被拒绝
我试图在我的 .config 文件中包含 chmod +x 命令,但它没有给出这样的目录错误。
script.config
commands:
01_chmod:chmod +x .platform/hooks/postdeploy/99_start_script.sh
cfn.init
2020-11-28 14:13:17,374 [错误] ------------------------构建 失败!------------ 2020-11-28 14:13:17,374 [错误] 构建期间未处理的异常:Command 01_chmod failed Traceback (最近一次通话最后一次):文件“/opt/aws/bin/cfn-init”,第 171 行,在 worklog.build(metadata, configSets) 文件“/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py”,行 129,正在构建中 承包商(元数据).build(configSets,self)文件“/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py”,行 530,正在构建中 self.run_config(config, worklog) 文件“/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py”,行 542,在运行配置中 CloudFormationCarpenter(config, self._auth_config).build(worklog) 文件“/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py”, 第 260 行,正在构建中 更改['commands'] = CommandTool().apply(self._config.commands) 文件“/usr/lib/python2.7/site-packages/cfnbootstrap/command_tool.py”, 第 117 行,申请中 raise ToolError(u"Command %s failed" % name) ToolError: Command 01_chmod failed
【问题讨论】:
标签: amazon-web-services amazon-elastic-beanstalk