Hi everyone,
I recently updated the gitlab community edition to 11.1.2 runnig into an error when calling:
gitlab-ctl reconfigure
There seems to be some permission error, which I can not resolve:
> Recipe: gitlab::database_migrations
> * bash[migrate gitlab-rails database] action run
> [execute] rake aborted!
> Errno::EACCES: Cannot load `Rails.application.database_configuration`:
> Permission denied @ rb_sysopen - /opt/gitlab/embedded/service/gitlab-rails/config/database.yml
> /opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:11:in `<top (required)>'
> /opt/gitlab/embedded/bin/bundle:23:in `load'
> /opt/gitlab/embedded/bin/bundle:23:in `<main>'
>
> Caused by:
> Errno::EACCES: Permission denied @ rb_sysopen - /opt/gitlab/embedded/service/gitlab-rails/config/database.yml
> /opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:11:in `<top (required)>'
> /opt/gitlab/embedded/bin/bundle:23:in `load'
> /opt/gitlab/embedded/bin/bundle:23:in `<main>'
> Tasks: TOP => gitlab:db:configure => environment
> (See full trace by running task with --trace)
>
> ================================================================================
> Error executing action `run` on resource 'bash[migrate gitlab-rails database]'
> ================================================================================
>
> Mixlib::ShellOut::ShellCommandFailed
> ------------------------------------
> Expected process to exit with [0], but received '1'
> ---- Begin output of "bash" "/tmp/chef-script20180802-19164-462i34" ----
> STDOUT: rake aborted!
> Errno::EACCES: Cannot load `Rails.application.database_configuration`:
> Permission denied @ rb_sysopen - /opt/gitlab/embedded/service/gitlab-rails/config/database.yml
> /opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:11:in `<top (required)>'
> /opt/gitlab/embedded/bin/bundle:23:in `load'
> /opt/gitlab/embedded/bin/bundle:23:in `<main>'
>
> Caused by:
> Errno::EACCES: Permission denied @ rb_sysopen - /opt/gitlab/embedded/service/gitlab-rails/config/database.yml
> /opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:11:in `<top (required)>'
> /opt/gitlab/embedded/bin/bundle:23:in `load'
> /opt/gitlab/embedded/bin/bundle:23:in `<main>'
> Tasks: TOP => gitlab:db:configure => environment
> (See full trace by running task with --trace)
I tried to change the acces to the file /opt/gitlab/embedded/service/gitlab-rails/config/database.yml manually to readable and executable to the git user, which is changed back by the reconfiguration step.
Thanks for any suggestions.