diff options
author | Zhanibek Adilbekov | 2024-03-11 21:37:45 +0500 |
---|---|---|
committer | Zhanibek Adilbekov | 2024-03-11 22:05:31 +0500 |
commit | f1e9aaa3ba5fa9161e3b3f7ac211477d13d12370 (patch) | |
tree | 1b0195a4a6c0ee3923e1d88570d4f5c5b978fec0 /pixelserv-ca-init.sh | |
parent | 6e230955019fa4222537e6095f1cc14662545273 (diff) | |
download | aur-pixelserv-tls.tar.gz |
feat: adjust permissions for cache dir
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 |