From bef375ef43988a8bfff2d8fccdd173661f42ba92 Mon Sep 17 00:00:00 2001 From: Emmet Date: Tue, 16 Jul 2024 10:02:28 -0500 Subject: [PATCH] Fixes for permissions scripts --- harden.sh | 27 ++++++++++++++------------- soften.sh | 2 +- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/harden.sh b/harden.sh index e1d65d5..05477d6 100755 --- a/harden.sh +++ b/harden.sh @@ -19,17 +19,18 @@ else SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) fi pushd $SCRIPT_DIR &> /dev/null; -chown 0:0 .; -chown 0:0 profiles/*; -chown -R 0:0 system; -chown -R 0:0 patches; -chown 0:0 flake.lock; -chown 0:0 flake.nix -chown 0:0 profiles -chown 0:0 profiles/*/configuration.nix; -chown 0:0 harden.sh; -chown 0:0 soften.sh; -chown 0:0 install.sh; -chown 0:0 update.sh; -chown 1000:users **/README.org; +sudo chown 0:0 .; +sudo chown 0:0 profiles/*; +sudo chown -R 0:0 system; +sudo chown -R 0:0 patches; +sudo chown 0:0 flake.lock; +sudo chown 0:0 flake.nix +sudo chown 0:0 profiles +sudo chown 0:0 profiles/*/configuration.nix; +sudo chown 0:0 profiles/homelab/base.nix; +sudo chown 0:0 harden.sh; +sudo chown 0:0 soften.sh; +sudo chown 0:0 install.sh; +sudo chown 0:0 update.sh; +sudo chown 1000:users **/README.org; popd &> /dev/null; diff --git a/soften.sh b/soften.sh index 93476c7..84dde5f 100755 --- a/soften.sh +++ b/soften.sh @@ -23,5 +23,5 @@ else SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) fi pushd $SCRIPT_DIR &> /dev/null; -chown -R 1000:users .; +sudo chown -R 1000:users .; popd &> /dev/null;