azure - 在 Azure 存储服务中挂载时如何更改文件夹或文件权限?
问题描述
请..等待您的认真回答。
我的开发环境是Azure cloud - Kubernetes
,我想在 Azure 的存储服务中安装 Gitlab Docker 镜像。
看下面的日志,Gitlab 启动并尝试更改 Azure 存储的权限,但 Azure 存储不允许这样做。
最终,Gitlab 无法启动。
我尝试在加载 Kubernetes 的 StorageClass、pv 和 pvc 时更改挂载选项,但无法应用。
请回答这个..
================================================================================
Error executing action `create` on resource 'storage_directory[/var/opt/gitlab/.ssh]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
ruby_block[directory resource: /var/opt/gitlab/.ssh] (/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 chmod 00700 /var/opt/gitlab/.ssh ----
STDOUT:
STDERR: chmod: changing permissions of '/var/opt/gitlab/.ssh': Operation not permitted
---- End output of chmod 00700 /var/opt/gitlab/.ssh ----
Ran chmod 00700 /var/opt/gitlab/.ssh returned 1
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/storage_directory_helper.rb:35:in `run_command'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/storage_directory_helper.rb:55:in `ensure_permissions_set'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb:40:in `block (3 levels) in class_from_file'
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/gitlab-shell.rb
34: storage_directory dir do
35: owner git_user
36: group git_group
37: mode "0700"
38: end
39: end
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/gitlab-shell.rb:34:in `block in from_file'
storage_directory("/var/opt/gitlab/.ssh") do
action [:create]
default_guard_interpreter :default
declared_type :storage_directory
cookbook_name "gitlab"
recipe_name "gitlab-shell"
owner "git"
group "git"
mode "0700"
path "/var/opt/gitlab/.ssh"
end
System Info:
------------
chef_version=14.14.29
platform=ubuntu
platform_version=16.04
ruby=ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]
program_name=/opt/gitlab/embedded/bin/chef-client
executable=/opt/gitlab/embedded/bin/chef-client
Running handlers:
There was an error running gitlab-ctl reconfigure:
storage_directory[/var/opt/gitlab/.ssh] (gitlab::gitlab-shell line 34) had an error: Mixlib::ShellOut::ShellCommandFailed: ruby_block[directory resource: /var/opt/gitlab/.ssh] (/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 chmod 00700 /var/opt/gitlab/.ssh ----
STDOUT:
STDERR: chmod: changing permissions of '/var/opt/gitlab/.ssh': Operation not permitted
---- End output of chmod 00700 /var/opt/gitlab/.ssh ----
Ran chmod 00700 /var/opt/gitlab/.ssh returned 1
Running handlers complete
Chef Client failed. 7 resources updated in 07 seconds
解决方案
推荐阅读
- javascript - How to highlight selected item with multiple lists to choose from in vue js
- c - TCP echo server doesn't accept client
- php - How to add a new text to existing one and identify specific user in php+mysql?
- ios - Swift package manager: How best to indicate platform dependent code?
- webpack - Vue.js:如何有条件地包含 SCSS?
- python - 为什么每次使用预训练的嵌入词向量和修复词元组运行后我的相似度值都会发生变化?
- appdynamics - AppDynamics Alerting - 如何根据每小时健康规则的呼叫次数 (trxn) 触发警报。(示例呼叫 < 10/小时)
- vim - 尝试在 VIM 中打开文件时出现 E488 尾随字符错误
- postgresql - PostgreSQL varchar 长度性能影响
- python - 根据某些系列数据集中的先前评级更新评级