Cannot change backups permissions
I have set gitlab's backup location to a mounted NFS share directory.
the directory is mounted: fstab has 10.10.1.100/mnt/backups /mnt/nfs/gitlabbackup nfs defaults 0 0
The directory has 775 permission and I chown'd it to git:git
I set gitlab.rb to place the backups at the mount location with the permissions 0777 then run 'sudo gitlab-ctl reconfigure' which fails with the following
* directory[/mnt/nfs/gitlabbackup/archives] action create
================================================================================
Error executing action `create` on resource 'directory[/mnt/nfs/gitlabbackup/archives]'
================================================================================
Errno::EPERM
------------
Operation not permitted @ chmod_internal - /mnt/nfs/gitlabbackup/archives
Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/gitlab-rails.rb
41: directory dir_name do
42: owner node['gitlab']['user']['username']
43: mode '0700'
44: recursive true
45: end
46: end
Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/gitlab-rails.rb:41:in `block in from_file'
directory("/mnt/nfs/gitlabbackup/archives") do
action :create
retries 0
retry_delay 2
default_guard_interpreter :default
path "/mnt/nfs/gitlabbackup/archives"
recursive true
declared_type :directory
cookbook_name "gitlab"
recipe_name "gitlab-rails"
owner "git"
mode "0700"
end
Running handlers:
[2015-09-17T14:40:17+01:00] ERROR: Running exception handlers
Running handlers complete
[2015-09-17T14:40:17+01:00] ERROR: Exception handlers complete
Chef Client failed. 1 resources updated in 7.054030176 seconds
[2015-09-17T14:40:17+01:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/chef-stacktrace.out
[2015-09-17T14:40:17+01:00] ERROR: Found 1 errors, they are stored in the backtrace
[2015-09-17T14:40:18+01:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
It seems the reconfigure script is still trying to chmod the directory permissions to 0700 despite my changing the gitlab.rb
file to specify 0777
(I tried other permissions also, reconfigure always seems to use 0700)