Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Composer can´t run composer scripts - permission denied

René Altmann December 16, 2019

I have following pipline config for my first step:

pipelines: 
default:
- step:
caches:
- composer
script:
- apt-get update && apt-get install -y unzip
- apt-get -y install php7.2-gd - apt-get install php7.2-mysql
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install

In my composer.json are some composer scripts defined like:

"scripts": { "post-install-cmd": [ "./app/bin/post-install.sh" ] }

 After the composer installation, it tries to run the post-install-cmd and throws following error:

sh: 1: ./app/bin/post-update.sh: Permission denied
Script ./app/bin/post-update.sh handling the post-update-cmd event returned with error code 126

How could i solve that?

1 answer

0 votes
Alexander Zhukov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 25, 2019

Hi @René Altmann . Error code 126 means that your post-install.sh script is not executable. To make it executable, you have to run

chmod +x ./app/bin/post-install.sh

 and then commit the changes and push to the repo. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events