diff options
Diffstat (limited to 'pixelserv-ca-init.sh')
-rwxr-xr-x | pixelserv-ca-init.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pixelserv-ca-init.sh b/pixelserv-ca-init.sh index d978948e2be6..bdd15161be0e 100755 --- a/pixelserv-ca-init.sh +++ b/pixelserv-ca-init.sh @@ -12,7 +12,12 @@ fi # check the ownership of the directory if [[ "$(stat -c '%U' "$TARGET_DIR")" != 'nobody' ]]; then - sudo chown -v nobody:nobody "$TARGET_DIR" + sudo chown -vR nobody:root "$TARGET_DIR" +fi + +# check directory permissions +if [[ "$(stat -c '%A' "$TARGET_DIR")" =~ '---$' ]]; then + sudo chmod -vR o-rwx "$TARGET_DIR" fi # generate cert |