Missing "sudo" in output of gitlab-rake rake:check SANITIZE=true
Summary
When running sudo gitlab-rake gitlab:check SANITIZE=true
and the repo base access permissions are wrong, the suggested fix is missing a sudo
before the find
command.
Steps to reproduce
I experience this issue after restoring a GitLab backup once I run the above-mentioned rake command using GitLab CE 8.3.2 (omnibus). The problem is that the /var/opt/gitlab/gitlab-data
directory is owned by git
and has permissions 700
.
Relevant logs and/or screenshots
This is the output of gitlab-rake
(excerpt):
Repo base access is drwxrws---? ... no
Try fixing it:
sudo chmod -R ug+rwX,o-rwx /var/opt/gitlab/git-data/repositories
sudo chmod -R ug-s /var/opt/gitlab/git-data/repositories
find /var/opt/gitlab/git-data/repositories -type d -print0 | sudo xargs -0 chmod g+s
For more information see:
doc/install/installation.md in section "GitLab Shell"
Please fix the error above and rerun the checks.
Possible fixes
I think it would suffice to prepend the third suggested command with sudo
, e.g. like so
sudo find /var/opt/gitlab/git-data/repositories -type d -print0 | sudo xargs -0 chmod g+s
(cf. https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/tasks/gitlab/check.rake#L434)