How do you add chmod +x permission to an AWS Elastic Beanstalk platform hook?
Normally you set the permissions on your local workstation, when before you zip your deployment package.
However, if you want to do this on EB instance, then you can't use container_commands
for that. The reason is that container_commands
execute after prebuild
. Instead you should try using commands
:
The prebuild files run after running commands found in the commands section of any configuration file and before running Buildfile commands.
Make sure to make your file executable in git
chmod +x path/to/file
git update-index --chmod=+x path/to/file
reference from How to add chmod permissions to file in GIT?