首页 > 解决方案 > 即使组在重新配置期间拥有该文件夹,Gitlab 也没有启动并尝试执行 chgrp 命令

问题描述

我正在尝试在带有 NAS 存储的 RHEL 7.9 上安装和试用 gitlab-ee。
Gitlab版本:gitlab-ee-13.11.0-ee.0.el7.x86_64

我已经用 NAS 路径更新了 gitlab.rb 文件。NAS 设置了 0770 权限。
我正在使用 gitlabdev 用户和 gitlabdev 组。

已对 gitlab.rb 文件进行了以下更改。

user[‘username’] = “gitlabdev” 
user[‘group’] = “gitlabdev” 
gitlab_rails[‘manage_backup_path’] = false
git_data_dirs({ “default” => { “path” => “/nas/data/gitlabrepo/” } })

错误 :

Gitlab 正在尝试更改组,即使该文件夹归 gitlab 用户所有。如果不能更改 gorup,Gitlab 就不会出现。

日志

Running handlers:
There was an error running gitlab-ctl reconfigure:
storage_directory[/nas/data/gitlabrepo] (gitlab::gitlab-rails line 47) had an error: Mixlib::ShellOut::ShellCommandFailed: ruby_block[directory resource: /nas/data/gitlabrepo] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb line 34) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of chgrp gitlabdev /nas/data/gitlabrepo ----
STDOUT:
STDERR: chgrp: changing group of ‘/nas/data/gitlabrepo’: Operation not permitted
---- End output of chgrp gitlabdev /nas/data/gitlabrepo ----
Ran chgrp gitlabdev /nas/data/gitlabrepo returned 1

我试过了。我手动检查了执行此命令后是否设置了任何特殊权限。我看不出有什么不同。

gitlabdev@ln228dgitlab $ ls -al /nas/data/gitlabrepo/
total 32
drwxrwx--- 2 gitlabdev gitlabdev  0 Apr 23 14:23 .
drwxr-xr-x 3 root      root      23 Mar  2 14:32 ..
gitlabdev@ln228dgitlab $ sudo chgrp gitlabdev /nas/data/gitlabrepo/
[sudo] password for gitlabdev:
gitlabdev@ln228dgitlab $ ls -al /nas/data/gitlabrepo/
total 32
drwxrwx--- 2 gitlabdev gitlabdev  0 Apr 23 14:23 .
drwxr-xr-x 3 root      root      23 Mar  2 14:32 ..

如果没有 NAS,Gitlab 就不会出现任何问题。关于启动和运行 Gitlab 需要做什么的任何想法。

标签: gitlabgitlab-omnibusgitlab-ee

解决方案


推荐阅读