From 42aae8bde4a11d239abb91e5fd75f0e843ecc8a9 Mon Sep 17 00:00:00 2001 From: aptalca <541623+aptalca@users.noreply.github.com> Date: Sun, 13 Oct 2024 12:17:41 -0400 Subject: [PATCH] use lsiown, ignore dev/cache folders --- README.md | 1 + readme-vars.yml | 1 + root/etc/s6-overlay/s6-rc.d/init-code-server/run | 11 ++++++++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 414fcc2..0a06b9b 100644 --- a/README.md +++ b/README.md @@ -307,6 +307,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **13.10.24:** - Ignore dev/cache folders during chown. * **09.10.24:** - Manage permissions in /config/.ssh according to file type * **19.08.24:** - Rebase to Ubuntu Noble. * **01.07.23:** - Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf) diff --git a/readme-vars.yml b/readme-vars.yml index 84ed2f2..74939c2 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -47,6 +47,7 @@ app_setup_block: | How to create the [hashed password](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#can-i-store-my-password-hashed). # changelog changelogs: + - {date: "13.10.24:", desc: "Ignore dev/cache folders during chown."} - {date: "09.10.24:", desc: "Manage permissions in /config/.ssh according to file type"} - {date: "19.08.24:", desc: "Rebase to Ubuntu Noble."} - {date: "01.07.23:", desc: "Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)"} 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 e0c1323..c002072 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 @@ -26,9 +26,14 @@ if [[ ! -f /config/.profile ]]; then cp /root/.profile /config/.profile fi -# fix permissions (ignore contents of /config/workspace) -find /config -path /config/workspace -prune -o -exec chown abc:abc {} + -chown abc:abc /config/workspace +# fix permissions (ignore contents of workspace and cache folders) +find /config \ + -path "/config/workspace" -prune -o \ + -path "/config/.npm" -prune -o \ + -path "/config/.rustup" -prune -o \ + -path "/config/.cargo" -prune -o \ + -exec lsiown abc:abc {} + +lsiown abc:abc /config/workspace chmod 700 /config/.ssh if [[ -n "$(ls -A /config/.ssh)" ]]; then find /config/.ssh/ -type d -exec chmod 700 '{}' \;