On a non-omnibus install (Arch Linux), I fail to change the location of repositories to something outside of /var/lib/gitlab. For instance, adding
home:
path: /var/lib/gitlab/foo/
gitaly_address: unix:/var/lib/gitlab/sockets/gitlab-gitaly.socket
to the storages section works. However, setting the path to /home/gitlab/repositories/
fails: GitLab refuses to start and I get the following error in unicorn.stderr.log:
/usr/share/webapps/gitlab/config/initializers/6_validations.rb:8:in
realpath': Permission denied @ realpath_rec - /home/gitlab (Errno::EACCES) from /usr/share/webapps/gitlab/config/initializers/6_validations.rb:8:in
realpath’
from /usr/share/webapps/gitlab/config/initializers/6_validations.rb:8:inblock in find_parent_path' from /usr/share/webapps/gitlab/config/initializers/6_validations.rb:7:in
each’
from /usr/share/webapps/gitlab/config/initializers/6_validations.rb:7:indetect' from /usr/share/webapps/gitlab/config/initializers/6_validations.rb:7:in
find_parent_path’
from /usr/share/webapps/gitlab/config/initializers/6_validations.rb:37:inblock in validate_storages_paths' from /usr/share/webapps/gitlab/config/initializers/6_validations.rb:36:in
each’
from /usr/share/webapps/gitlab/config/initializers/6_validations.rb:36:invalidate_storages_paths' from /usr/share/webapps/gitlab/config/initializers/6_validations.rb:45:in
<top (required)>’
from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:inload' from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in
block in load’
from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:inload_dependency' from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in
load’
from /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/railties-4.2.8/lib/rails/engine.rb:652:in `block in load_config_initializer’
…
The permissions for /home/gitlab/repositories
are exactly the same as for /var/lib/gitlab/foo
. Is there something like the ruby equivalent of PHP’s open_basedir?