use lsiown, ignore dev/cache folders

This commit is contained in:
aptalca 2024-10-13 12:17:41 -04:00
parent b0f61803a2
commit 42aae8bde4
No known key found for this signature in database
GPG Key ID: BE36CFFB9FD85548
3 changed files with 10 additions and 3 deletions

View File

@ -307,6 +307,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions ## Versions
* **13.10.24:** - Ignore dev/cache folders during chown.
* **09.10.24:** - Manage permissions in /config/.ssh according to file type * **09.10.24:** - Manage permissions in /config/.ssh according to file type
* **19.08.24:** - Rebase to Ubuntu Noble. * **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) * **01.07.23:** - Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)

View File

@ -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). How to create the [hashed password](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#can-i-store-my-password-hashed).
# changelog # changelog
changelogs: 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: "09.10.24:", desc: "Manage permissions in /config/.ssh according to file type"}
- {date: "19.08.24:", desc: "Rebase to Ubuntu Noble."} - {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)"} - {date: "01.07.23:", desc: "Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)"}

View File

@ -26,9 +26,14 @@ if [[ ! -f /config/.profile ]]; then
cp /root/.profile /config/.profile cp /root/.profile /config/.profile
fi fi
# fix permissions (ignore contents of /config/workspace) # fix permissions (ignore contents of workspace and cache folders)
find /config -path /config/workspace -prune -o -exec chown abc:abc {} + find /config \
chown abc:abc /config/workspace -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 chmod 700 /config/.ssh
if [[ -n "$(ls -A /config/.ssh)" ]]; then if [[ -n "$(ls -A /config/.ssh)" ]]; then
find /config/.ssh/ -type d -exec chmod 700 '{}' \; find /config/.ssh/ -type d -exec chmod 700 '{}' \;