我需要从/ tmp / packer-shell975270284更改打包程序运行AMI设置脚本的目录,因为我们的实例不允许以/ tmp形式运行脚本。
此脚本需要在/ opt或/ home / ec2-user中运行。它将拥有权限的地方
下面是可笑的剧本运行后出现的错误。
==> amazon-ebs: Provisioning with shell script: /tmp/packer-shell975270284
Build 'amazon-ebs' errored: Error uploading script: scp: /tmp/script_5412.sh: Permission denied.
==> Some builds didn't complete successfully and had errors.
==> Builds finished but no artifacts were created.