Kubernetes restore permission denied
I'm trying to setup gitlab in the kubernetes cluster but when I try to restore from a back I get a permission denied.
Restoring uploads ...
rake aborted!
Errno::EACCES: Permission denied @ rb_file_s_rename - (/gitlab-data/uploads, /gitlab-data/uploads.1507493751)
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/files.rb:46:in `backup_existing_files_dir'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/files.rb:37:in `restore'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:140:in `block (4 levels) in <top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:57:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:backup:uploads:restore
Permissions on the folder are:
root@gitlab-gitlab-1239250305-0b19s:/gitlab-data# ll
total 32
drwxrwxr-x 8 root root 4096 Oct 8 20:01 ./
drwxr-xr-x 1 root root 4096 Oct 8 19:14 ../
drwx------ 2 git root 4096 Oct 8 16:46 builds/
drwx------ 15 git root 4096 Oct 8 20:15 git-data/
drwxrwxr-x 2 mattermost root 4096 Oct 8 20:09 mattermost/
drwxr-x--x 5 git gitlab-www 4096 Oct 8 16:46 shared/
drwx------ 2 git git 4096 Oct 8 16:46 ssh/
drwx------ 2 git git 4096 Oct 8 19:36 uploads/
I also tried to run the reconfigure command but that didn't help.
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Proxy: no Current User: git Using RVM: no Ruby Version: 2.3.5p376 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.0.0 Redis Version: 3.2.5 Git Version: 2.13.5 Sidekiq Version:5.0.4 Go Version: unknown
GitLab information Version: 10.0.3-ee Revision: eff7821 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.3 URL: https://gitlab.momentech.no HTTP Clone URL: https://gitlab.momentech.no/some-group/some-project.git SSH Clone URL: git@gitlab.momentech.no:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: no
GitLab Shell Version: 5.9.0 Repository storage paths:
- default: /gitlab-data/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...
GitLab Shell version >= 5.9.0 ? ... OK (5.9.0) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 2/1 ... ok 2/2 ... ok 2/3 ... ok 2/4 ... ok 3/5 ... ok 3/6 ... ok 4/7 ... ok 4/8 ... ok 4/9 ... ok 4/10 ... ok 5/11 ... ok 6/12 ... ok 6/13 ... ok 6/14 ... ok 6/15 ... ok 7/16 ... ok 7/17 ... ok 7/18 ... ok 7/19 ... ok 7/20 ... ok 8/21 ... ok 8/22 ... ok 8/23 ... ok 8/24 ... ok 9/25 ... ok 9/27 ... ok 9/28 ... ok 9/29 ... ok 9/30 ... ok 9/31 ... ok 9/32 ... ok 11/34 ... ok 11/35 ... ok 11/36 ... ok 11/37 ... ok 12/38 ... ok 3/39 ... ok 12/40 ... ok 13/41 ... ok 13/42 ... repository is empty 14/43 ... ok 14/44 ... ok 14/45 ... ok 14/46 ... ok 15/47 ... ok 16/48 ... ok 16/49 ... ok 16/50 ... ok 16/51 ... ok 5/59 ... ok 16/60 ... ok 16/61 ... repository is empty 16/62 ... repository is empty Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /gitlab-data/ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Reply by email is disabled in config/gitlab.yml Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... skipped (no tmp uploads folder yet) Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 2/1 ... yes 2/2 ... yes 2/3 ... yes 2/4 ... yes 3/5 ... yes 3/6 ... yes 4/7 ... yes 4/8 ... yes 4/9 ... yes 4/10 ... yes 5/11 ... yes 6/12 ... yes 6/13 ... yes 6/14 ... yes 6/15 ... yes 7/16 ... yes 7/17 ... yes 7/18 ... yes 7/19 ... yes 7/20 ... yes 8/21 ... yes 8/22 ... yes 8/23 ... yes 8/24 ... yes 9/25 ... yes 9/27 ... yes 9/28 ... yes 9/29 ... yes 9/30 ... yes 9/31 ... yes 9/32 ... yes 11/34 ... yes 11/35 ... yes 11/36 ... yes 11/37 ... yes 12/38 ... yes 3/39 ... yes 12/40 ... yes 13/41 ... yes 13/42 ... yes 14/43 ... yes 14/44 ... yes 14/45 ... yes 14/46 ... yes 15/47 ... yes 16/48 ... yes 16/49 ... yes 16/50 ... yes 16/51 ... yes 5/59 ... yes 16/60 ... yes 16/61 ... yes 16/62 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.3 ? ... yes (2.3.5) Git version >= 2.7.3 ? ... yes (2.13.5) Git user has default SSH configuration? ... yes Active users: ... 1 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)
Checking GitLab ... Finished