From 7579ec248acc12b2ad4bb5084aa9731533794ad3 Mon Sep 17 00:00:00 2001 From: Mark Gonzales Date: Sat, 31 Aug 2024 21:50:18 -0500 Subject: [PATCH] changes perms in .ssh to file type --- root/etc/s6-overlay/s6-rc.d/init-code-server/run | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/root/etc/s6-overlay/s6-rc.d/init-code-server/run b/root/etc/s6-overlay/s6-rc.d/init-code-server/run index 883024d..e0c1323 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-code-server/run +++ b/root/etc/s6-overlay/s6-rc.d/init-code-server/run @@ -31,5 +31,7 @@ find /config -path /config/workspace -prune -o -exec chown abc:abc {} + chown abc:abc /config/workspace chmod 700 /config/.ssh if [[ -n "$(ls -A /config/.ssh)" ]]; then - chmod 600 /config/.ssh/* + find /config/.ssh/ -type d -exec chmod 700 '{}' \; + find /config/.ssh/ -type f -exec chmod 600 '{}' \; + find /config/.ssh/ -type f -iname '*.pub' -exec chmod 644 '{}' \; fi