Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Installation & Hosting

Permission problems installing into centos7 docker image

Started by Jeff 8 years ago · 0 replies · 1271 views
8 years ago

Hey guys,

This isn't a problem per say since I already found the answer to my problem. But I thought I should contribute it here so that others that might run across the same problem will find a reference to it.

While trying to build an image for our production images based on the cents:7 docker base image, I got 'permission denied' when the composer was running the post install commands. The permission denied was happening when the "bin/grav install" command was attempted. Turns out the permissions on the files in the bin directory were not allowing execution. Here is a sample from my docker build:

Generating autoload files
> bin/grav install
sh: bin/grav: Permission denied
Script bin/grav install handling the post-create-project-cmd event returned with error code 126
The command '/bin/sh -c php composer.phar create-project getgrav/grav /webroot/grav 1.3.10' returned a non-zero code: 126

After searching for a while without much luck, I found an unrelated article explaining a problem related to php+zip decompression that could cause permissions to be wrong. This link provided the hint:

https://github.com/composer/composer/issues/4471

I added a docker step to install unzip thru yum and voila it works. My docker build now installs cleanly with grav installing thru the composer properly.

Now on to the next steps ;-)

Jeff

Suggested topics

Topic Participants Replies Views Activity
Installation & Hosting · by antoinep, 19 hours ago
7 72 1 hour ago
Installation & Hosting · by Jürgen Dietrich, 7 months ago
0 65 7 months ago
Installation & Hosting · by rappluk, 8 months ago
0 65 8 months ago
Installation & Hosting · by N, 12 months ago
3 76 12 months ago
Installation & Hosting · by Youle, 1 year ago
1 64 1 year ago