Fix ssh permission denied(publickey) at reinstalling the chart without deleting pvc #25

Merged
lunny merged 1 commits from luhahn/helm-chart:master into master 2020-09-23 03:22:22 +00:00
Member

Found a bug / strange behavior with longhorn storage. When gitea is reinstalled without deleting the PVC then kubernetes remounts the volume but uses default permissions for /data/git/.ssh which causes all ssh clone attempts to fail with: Permission denied (publickey)

The init container now creates this folder and sets permissions 700

Found a bug / strange behavior with longhorn storage. When gitea is reinstalled without deleting the PVC then kubernetes remounts the volume but uses default permissions for /data/git/.ssh which causes all ssh clone attempts to fail with: Permission denied (publickey) The init container now creates this folder and sets permissions 700
luhahn added 1 commit 2020-09-21 15:54:44 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
23c0110a6a
Fix ssh permission denied(publickey) at reinstalling the chart without deleting pvc
techknowlogick reviewed 2020-09-21 22:30:43 +00:00
Dismissed
@ -26,2 +26,4 @@
- name: SCRIPT
value: &script |-
mkdir -p /data/git/.ssh
chmod 700 /data/git/.ssh

Should this be recursive chmod, in case there are any existing files inside that folder already?

Should this be recursive chmod, in case there are any existing files inside that folder already?
Author
Member

Somehow this only affects the main .ssh folder. I tried it manually with this command and everything works fine again after chmod 700 /data/git/.ssh even if there are files present already.

Somehow this only affects the main .ssh folder. I tried it manually with this command and everything works fine again after chmod 700 /data/git/.ssh even if there are files present already.

ah ok. thanks for testing :)

ah ok. thanks for testing :)
techknowlogick marked this conversation as resolved
techknowlogick approved these changes 2020-09-23 02:11:12 +00:00
Dismissed
lunny approved these changes 2020-09-23 03:22:14 +00:00
Dismissed
lunny merged commit 1a1a001656 into master 2020-09-23 03:22:22 +00:00
Sign in to join this conversation.
No description provided.