Skip to content

Commit

Permalink
fix: Initialize log file permissions
Browse files Browse the repository at this point in the history
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 v2fly#38
  • Loading branch information
dctxmei committed Aug 14, 2020
1 parent c5d661f commit 9b090f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions install-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9b090f8

Please sign in to comment.