Skip to content

Assertion error on 13.5 upgrade: /var/opt/gitlab/git-data/repositories being chmod 2770

We are seeing an issue where some instances generate an error during upgrade. An assertion error regarding: /var/opt/gitlab/git-data/repositories not chmod 2770. This error seems to stem from this MR not making it into the release: !4661 (merged)

We are working to release a new set of packages to resolve this problem: gitlab-org/release/tasks#1802 (closed).

Error output:

There was an error running gitlab-ctl reconfigure:

storage_directory[/var/opt/gitlab/git-data/repositories] (gitlab::gitlab-rails line 57) had an error: Mixlib::ShellOut::ShellCommandFailed: ruby_block[directory resource: /var/opt/gitlab/git-data/repositories] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb line 34) had an error: Mixlib::ShellOut::ShellCommandFailed: Failed asserting that mode permissions on "/var/opt/gitlab/git-data/repositories" is 2770

Workaround

By default, we expect /var/opt/gitlab/git-data/repositories to be owned by git:git, with permissions 02770. If you are receiving this error, try the following:

chgrp git /var/opt/gitlab/git-data/repositories
chmod 02770 /var/opt/gitlab/git-data/repositories
gitlab-ctl reconfigure
Edited by Ian Baum