gitlab - 即使组在重新配置期间拥有该文件夹,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 需要做什么的任何想法。
解决方案
推荐阅读
- protocol-buffers - varint中数据块长度和文件长度有什么关系?
- ios - 目标 c - 从图库或相机中选择图像后 - 需要启用旋转、翻转编辑
- php - 密码保护文件,查询字符串除外 - .htaccess
- angular - 删除选定的行索引
- swift - 扩展一个泛型类型,其中 T 具有另一个泛型类型
- javascript - 如何根据最新时间戳获取活动行号?
- mongodb - MongoDB - 使用 12 字节字符串作为唯一标识符而不是增量值的优势
- python - 一次处理一列,而不是将整个数据保存在 python 的内存中
- html - 弹性项目的高度未保持固定
- google-places-api - Google Places Api 详细信息不再显示评论?