0

after cloning the existing openshift app using rhc app create dev --from-app sample/live, I push the repo to execute the build.

Then it raises an error while building.

server reponse:

...
~/.env/user_vars/APP_ENV: Permission denied
...
... Error activating gear: CLIENT_ERROR: Failed to execute action hook 'deploy' ... 

deploy hook command: that triggers the error

if [ "$(type -t set_env_var)" == "function" ]; then
  set_env_var 'APP_ENV' $APP_ENV $OPENSHIFT_HOMEDIR/.env/user_vars
  set_env_var 'APP_DEBUG' $APP_DEBUG $OPENSHIFT_HOMEDIR/.env/user_vars
fi
marlo
  • 123
  • 5

1 Answers1

0

tldr: delete and recreate the files

Cause: when we clone an existing openshift app, Openshift is the one that writes the files on ~.env/user_vars/ directory. Thus will have the root as the owner.

To solve it, I need to change the owner of these files.

Since chown and chmod could not be used, we will delete and recreate the file. Luckily we have the delete permission. :)

marlo
  • 123
  • 5