How to restore default directory/files owner in the following:
/etc/gitlab
/var/log/gitlab
/var/opt/gitlab
Accidentally I have changed permissions in the above and now my gitlab-ce container won’t start
Command: chown -R user:user
In the container I mapped with those volumes like:
“cfg:/etc/gitlab”
“log:/var/log/gitlab”
“data:/var/opt/gitlab”
Now when I start container following error is present
Error:
gitlab Reconfigured!
Checking for unmigrated data on legacy storage
Upgrade failed. Could not check for unmigrated data on legacy storage.
If you would like to restart the instance without perfming this check
check, add the following to your docker command:
-e GITLAB_SKIP_UNMIGRATED_DATA_CHECK=true
Current owners:
Current owner:
├── [root root ] cfg
│ ├── [root root ] gitlab-secrets.json
│ ├── [root root ] gitlab.rb
│ ├── [root root ] ssh_host_ecdsa_key
│ ├── [root root ] ssh_host_ecdsa_key.pub
│ ├── [root root ] ssh_host_ed25519_key
│ ├── [root root ] ssh_host_ed25519_key.pub
│ ├── [root root ] ssh_host_rsa_key
│ ├── [root root ] ssh_host_rsa_key.pub
│ └── [root root ] trusted-certs
├── [root root ] data
│ ├── [992 root ] alertmanager
│ ├── [998 root ] backups
│ ├── [root root ] bootstrapped
│ ├── [998 998 ] git-data
│ ├── [998 root ] gitaly
│ ├── [998 root ] gitlab-ci
│ ├── [998 root ] gitlab-exporter
│ ├── [998 root ] gitlab-kas
│ ├── [998 root ] gitlab-rails
│ ├── [998 root ] gitlab-shell
│ ├── [998 999 ] gitlab-workhorse
│ ├── [root root ] logrotate
│ ├── [root 999 ] nginx
│ ├── [996 root ] postgres-exporter
│ ├── [996 root ] postgresql
│ ├── [992 root ] prometheus
│ ├── [root root ] public_attributes.json
│ ├── [997 998 ] redis
│ └── [root root ] trusted-certs-directory-hash
[root root ] log
├── [992 root ] alertmanager
├── [998 root ] gitaly
├── [998 root ] gitlab-exporter
├── [998 root ] gitlab-kas
├── [998 root ] gitlab-rails
├── [998 root ] gitlab-shell
├── [998 root ] gitlab-workhorse
├── [root root ] logrotate
├── [root 999 ] nginx
├── [996 root ] postgres-exporter
├── [996 root ] postgresql
├── [992 root ] prometheus
├── [998 root ] puma
├── [root root ] reconfigure
├── [997 root ] redis
├── [997 root ] redis-exporter
├── [998 root ] sidekiq
└── [root root ] sshd
Any idea how to restore default owners?