Fix "bad ownership or modes for directory /etc" #3

merged
opened by kdy.ch targeting main from kdy.ch/knot-docker: fix/ssh-perms

I am not sure if you'll be fine with this kind of solution, but I couldn't push to my Knot due to permission issues. The logs would print:

Unsafe AuthorizedKeysCommand "/etc/s6-overlay/scripts/keys-wrapper": bad ownership or modes for directory /etc

Adding this chmod resolved this, and it doesn't seem to impact the container as is.

Changed files
+1
+1
Dockerfile
··· 21 21 label org.opencontainers.image.licenses='MIT' 22 22 23 23 copy rootfs . 24 + run chmod 755 /etc 24 25 run chmod -R 755 /etc/s6-overlay 25 26 run apk add shadow s6-overlay execline openssl openssh git curl bash 26 27 run useradd -d /home/git git && openssl rand -hex 16 | passwd --stdin git