From 9b090f80f9d95a133f1635846f5f1c9f255c0589 Mon Sep 17 00:00:00 2001 From: Dct Mei Date: Fri, 14 Aug 2020 20:58:22 +0800 Subject: [PATCH] fix: Initialize log file permissions 1. It seems that someone will run V2Ray directly through commands instead of systemd first, which will cause wrong Log file permissions and affect subsequent systemd operations. issue #38 --- install-release.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install-release.sh b/install-release.sh index bc7b9b5..a16aa3d 100644 --- a/install-release.sh +++ b/install-release.sh @@ -370,8 +370,12 @@ install_v2ray() { if [[ ! -d '/var/log/v2ray/' ]]; then if [[ -n "$(id nobody | grep nogroup)" ]]; then install -d -m 700 -o nobody -g nogroup /var/log/v2ray/ + install -m 600 -o nobody -g nogroup /var/log/v2ray/access.log + install -m 600 -o nobody -g nogroup /var/log/v2ray/error.log else install -d -m 700 -o nobody -g nobody /var/log/v2ray/ + install -m 600 -o nobody -g nobody /var/log/v2ray/access.log + install -m 600 -o nobody -g nobody /var/log/v2ray/error.log fi LOG='1' fi