use lsiown, ignore dev/cache folders

This commit is contained in:
aptalca
2024-10-13 12:17:41 -04:00
parent b0f61803a2
commit 42aae8bde4
3 changed files with 10 additions and 3 deletions

View File

@@ -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 '{}' \;