我在rasberry pi模型3上使用gitlab。关于我的设置(import itertools
def create_tour(alist):
return list(itertools.permutations(alist,2))
)的一些信息:
sudo gitlab-rake gitlab:env:info
gitlab更新到版本10.6.0之后我需要再次更改网址,但是当我在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
中进行必要的更改并运行/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]'
============================================================================
所以问题似乎是,在资源存储上执行运行和创建命令(外部的 GitLab 文件夹) HDD [HDD = SeagateExpansion])期望权限为700,对吗?
根据这个错误我试图改变许可
外部HDD文件夹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
请参阅/mnt/SeagateExpansion/GitLab
输出:
ls -l
在this帖子的帮助下,我尝试使用以下命令更改权限:
drwxrwxrwx 1 root GitLabUser 0 Jan 4 17:55 GitLab
到必需的权限700 。但这些变化不会产生影响。我还尝试了sudo find /mnt/SeagateExpansion/GitLab -type d -exec chmod 700 {} \;
并执行了 root 命令,但更改没有生效。甚至在重新启动树莓派后。我做错了什么?
我还尝试将chmod -R 700 /mnt/SeagateExpansion/GitLab
中的选项设置/标志更改为/etc/fstab
,但这对以太无效。
我很感谢每一个提示和答案:)。
致以最诚挚的问候,
Bredjo
答案 0 :(得分:0)
我终于明白了。解决方案是更改/etc/fstab
中的装载设置。因为如果您有错误的选项设置(请参阅:https://en.wikipedia.org/wiki/Fstab),您无法更改权限,因为它是ntfs
文件系统。
所以我的旧 fstab
条目是这样的:
UUID=FE820568820526AD /mnt/SeagateExpansion ntfs defaults,gid=GitLabUser 0 0
新条目就是:
UUID=FE820568820526AD /mnt/SeagateExpansion ntfs-3g permissions 0 0
请注意,您需要安装 ntfs-3g 才能在fstab
中使用它。 permissions
选项仅包含 ntfs-3g 。请参阅:https://www.tuxera.com/community/ntfs-3g-advanced/ownership-and-permissions/
在此更改后,我再次执行:
sudo gitlab-ctl reconfigure
现在错误消失了,可以设置文件夹/mnt/SeagateExpansion/GitLab
的权限 700 。我还注意到重新配置后GitLab
文件夹的所有者也更改为用户git
:
drwx------ 1 git root 0 Jan 4 17:55 GitLab
那是因为我不再需要gid=GitLabUser
选项了。
现在一切都运转了。)。