diff --git a/scripts/provision-existing-users.sh b/scripts/provision-existing-users.sh index 627fed44..d10abeea 100755 --- a/scripts/provision-existing-users.sh +++ b/scripts/provision-existing-users.sh @@ -161,8 +161,9 @@ while IFS='|' read -r email username; do sudo mkdir -p "$HOME_DIR/.pi/agent/sessions" # Set ownership and permissions last + # chmod 775 so the service user (in the user's group) can read/write for background jobs sudo chown -R "$shell_user:$shell_user" "$USER_ROOT" - sudo chmod 770 "$USER_ROOT" + sudo chmod -R 775 "$USER_ROOT" # Add service user to this user's group so server jobs can access user data SERVICE_USER="${SUDO_USER:-$(whoami)}"