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 #38pull/39/head
parent
c5d661fca6
commit
9b090f80f9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue