diff --git a/packaging/deb/init.d/grafana-server b/packaging/deb/init.d/grafana-server index a4f6423a68d..9de4bf42092 100755 --- a/packaging/deb/init.d/grafana-server +++ b/packaging/deb/init.d/grafana-server @@ -36,6 +36,8 @@ MAX_OPEN_FILES=10000 PID_FILE=/var/run/$NAME.pid DAEMON=/usr/sbin/$NAME +umask 0027 + if [ `id -u` -ne 0 ]; then echo "You need root privileges to run this script" exit 4 diff --git a/packaging/deb/systemd/grafana-server.service b/packaging/deb/systemd/grafana-server.service index e1d024750d2..16b975f23ea 100644 --- a/packaging/deb/systemd/grafana-server.service +++ b/packaging/deb/systemd/grafana-server.service @@ -17,6 +17,7 @@ ExecStart=/usr/sbin/grafana-server \ cfg:default.paths.data=${DATA_DIR} \ LimitNOFILE=10000 TimeoutStopSec=20 +UMask=0027 [Install] WantedBy=multi-user.target