diff --git a/rootfs-php74/app/entrypoint.sh b/rootfs-php74/app/entrypoint.sh index f9e9265..1667944 100755 --- a/rootfs-php74/app/entrypoint.sh +++ b/rootfs-php74/app/entrypoint.sh @@ -60,6 +60,13 @@ for keytype in ecdsa rsa ed25519 ; do chmod 0600 "/ssh/ssh_host_${keytype}_key" chmod 0644 "/ssh/ssh_host_${keytype}_key.pub" done + +# set authorized_keys permissions +if [ -f /ssh/authorized_keys ] ; then + chmod 0600 /ssh/authorized_keys + chown "${USERNAME}:${GROUPNAME}" /ssh/authorized_keys +fi + chmod 0700 "${WEBROOT}/.ssh" /usr/sbin/sshd -e diff --git a/rootfs/app/entrypoint.sh b/rootfs/app/entrypoint.sh index 5af895b..0918b99 100755 --- a/rootfs/app/entrypoint.sh +++ b/rootfs/app/entrypoint.sh @@ -70,6 +70,13 @@ for keytype in ecdsa rsa ed25519 ; do chmod 0600 "/ssh/ssh_host_${keytype}_key" chmod 0644 "/ssh/ssh_host_${keytype}_key.pub" done + +# set authorized_keys permissions +if [ -f /ssh/authorized_keys ] ; then + chmod 0600 /ssh/authorized_keys + chown "${USERNAME}:${GROUPNAME}" /ssh/authorized_keys +fi + chmod 0700 "${WEBROOT}/.ssh" /usr/sbin/sshd -e