【发布时间】:2018-08-25 07:02:32
【问题描述】:
我在 rasberry pi 模型 3 B 上使用 gitlab。以下关于我的 设置 (sudo gitlab-rake gitlab:env:info) 的一些信息:
System information
System: Raspbian 8.0
Current User: git
Using RVM: no
Ruby Version: 2.3.6p384
Gem Version: 2.6.13
Bundler Version:1.13.7
Rake Version: 12.3.0
Redis Version: 3.2.11
Git Version: 2.14.3
Sidekiq Version:5.0.5
Go Version: go1.3.3 linux/arm
GitLab information
Version: 10.6.0-rc3
Revision: 52fa89e
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: http://gitlab.example.com
HTTP Clone URL: http://gitlab.example.com/some-group/some-project.git
SSH Clone URL: git@gitlab.example.com:some-group/some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 6.0.3
Repository storage paths:
- default: /mnt/SeagateExpansion/GitLab/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks
Git: /opt/gitlab/embedded/bin/git
在 gitlab 更新到版本 10.6.0 后,我需要再次更改 url,但是当我在 /etc/gitlab/gitlab.rb 中进行必要的更改并运行 sudo nano gitlab-ctl reconfigure 时,我收到以下 错误消息:
========================================================================
Error executing action `run` on resource 'ruby_block[directory resource:
/mnt/SeagateExpansion/GitLab]'
========================================================================
和
============================================================================
Error executing action `create` on resource
'storage_directory[/mnt/SeagateExpansion/GitLab]'
============================================================================
结果信息说:
There was an error running gitlab-ctl reconfigure:
storage_directory[/mnt/SeagateExpansion/GitLab] (gitlab::gitlab-rails line 42) had an error: Mixlib::ShellOut::ShellCommandFailed: ruby_block[directory resource: /mnt/SeagateExpansion/GitLab] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb line 33) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of chmod 00700 /mnt/SeagateExpansion/GitLab ----
STDOUT:
STDERR: chmod: changing permissions of ‘/mnt/SeagateExpansion/GitLab’: Operation not permitted
---- End output of chmod 00700 /mnt/SeagateExpansion/GitLab ----
Ran chmod 00700 /mnt/SeagateExpansion/GitLab returned 1
所以问题似乎是,在资源存储上执行 run 和 create 命令(外部上的 GitLab 文件夹HDD [HDD = SeagateExpansion]) 期望权限为 700,对吧?
根据这个错误我试图改变权限
外部硬盘文件夹/mnt/SeagateExpansion/GitLab 见ls -l 输出:
drwxrwxrwx 1 root GitLabUser 0 Jan 4 17:55 GitLab
在this帖子的帮助下,我尝试使用以下命令更改权限:
sudo find /mnt/SeagateExpansion/GitLab -type d -exec chmod 700 {} \;
到所需的权限 700。但更改不会生效。我还尝试了chmod -R 700 /mnt/SeagateExpansion/GitLab 并以 root 身份执行了命令,但更改没有生效。即使在重新启动树莓派之后。我做错了什么?
我还尝试将/etc/fstab 中硬盘的选项 设置/标志更改为user,但这对以太没有帮助。
感谢每一个提示和回答:)。
最好的问候,
布雷乔
【问题讨论】:
标签: unix gitlab chmod gitlab-omnibus