So I created a backup some weeks ago of the data, logs and config volumes that docker GitLab-CE uses. Now I’m trying to install a docker container pointing to those directories and I’m having issues with permissions.
I’m launching docker with:
sudo docker run \
--publish 443:443 --publish 80:80 \
--name gitlab \
--restart always \
--volume /Users/mike/Desktop/GitLab/config:/etc/gitlab \
--volume /Users/mike/Desktop/GitLab/logs:/var/log/gitlab \
--volume /Users/mike/Desktop/GitLab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest
The error(s):
* file[/var/opt/gitlab/postgresql/data/server.crt] action create
================================================================================
Error executing action `create` on resource 'file[/var/opt/gitlab/postgresql/data/server.crt]'
================================================================================
Errno::EPERM
------------
Operation not permitted @ apply2files - /var/opt/gitlab/postgresql/data/server.crt
Resource Declaration:
---------------------
suppressed sensitive resource output
Compiled Resource:
------------------
suppressed sensitive resource output
System Info:
------------
chef_version=13.6.4
platform=ubuntu
platform_version=16.04
ruby=ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
program_name=/opt/gitlab/embedded/bin/chef-client
executable=/opt/gitlab/embedded/bin/chef-client
Recipe: gitlab::gitlab-rails
* execute[clear the gitlab-rails cache] action run (skipped due to not_if)
Recipe: gitaly::enable
* runit_service[gitaly] action hup (up to date)
Running handlers:
There was an error running gitlab-ctl reconfigure:
file[/var/opt/gitlab/postgresql/data/server.crt] (postgresql::enable line 91) had an error: Errno::EPERM: Operation not permitted @ apply2files - /var/opt/gitlab/postgresql/data/server.crt
Running handlers complete
Chef Client failed. 81 resources updated in 10 seconds
This is the perms on these files and I can’t change them for some reason:
root /Users/mike/Desktop/GitLab/data/postgresql/data # ls -la
total 120
drwx------@ 20 mike staff 640 Jun 16 16:27 .
drwxr-xr-x@ 7 mike staff 224 Jun 16 16:27 ..
-rwx------@ 1 mike staff 4 Jun 11 17:47 PG_VERSION
drwx------@ 6 mike staff 192 Jun 16 02:21 base
drwx------@ 42 mike staff 1344 Jun 16 02:21 global
drwx------@ 3 mike staff 96 Jun 16 02:21 pg_clog
-rwx------@ 1 mike staff 3198 Jun 11 17:47 pg_hba.conf
-rwx------@ 1 mike staff 1789 Jun 11 17:47 pg_ident.conf
drwx------@ 4 mike staff 128 Jun 16 02:21 pg_multixact
drwx------@ 3 mike staff 96 Jun 16 02:21 pg_notify
drwx------@ 7 mike staff 224 Jun 16 02:21 pg_stat_tmp
drwx------@ 3 mike staff 96 Jun 16 02:21 pg_subtrans
drwx------@ 5 mike staff 160 Jun 16 02:21 pg_xlog
-rwx------@ 1 mike staff 88 Jun 11 17:47 postgresql.auto.conf
-rwx------@ 1 mike staff 16594 Jun 11 17:47 postgresql.conf
-rwx------@ 1 mike staff 88 Jun 11 17:47 postmaster.opts
-rwx------@ 1 mike staff 100 Jun 11 17:47 postmaster.pid
-rwx------@ 1 mike staff 4544 Jun 11 17:47 runtime.conf
-rwx------ 1 mike staff 1805 Jun 11 17:47 server.crt
-rwx------ 1 mike staff 3243 Jun 11 17:47 server.key
root /Users/mike/Desktop/GitLab/data/postgresql/data # chmod 0777 server.crt
chmod: Unable to change file mode on server.crt: Operation not permitted
I tried running the update-permissions, it shows the same operation not permitted messages. It only does that for server.crt and server.key which is odd. Also many files/folders in git-data.
How do I fix this?