Skip to content

Commit

Permalink
use lsiown, ignore dev/cache folders
Browse files Browse the repository at this point in the history
  • Loading branch information
aptalca committed Oct 13, 2024
1 parent b0f6180 commit 42aae8b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)"}
Expand Down
11 changes: 8 additions & 3 deletions root/etc/s6-overlay/s6-rc.d/init-code-server/run
Original file line number Diff line number Diff line change
Expand Up @@ -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 '{}' \;
Expand Down

0 comments on commit 42aae8b

Please sign in to comment.