mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
AccessControl: Add provisioning folder to the packaging process (#34398)
* AccessControl: Add provisioning folder to the packaging process
This commit is contained in:
@@ -47,6 +47,11 @@ case "$1" in
|
||||
cp /usr/share/grafana/conf/provisioning/plugins/sample.yaml $PROVISIONING_CFG_DIR/plugins/sample.yaml
|
||||
fi
|
||||
|
||||
if [ ! -d $PROVISIONING_CFG_DIR/access-control ]; then
|
||||
mkdir -p $PROVISIONING_CFG_DIR/access-control
|
||||
cp /usr/share/grafana/conf/provisioning/access-control/sample.yaml $PROVISIONING_CFG_DIR/access-control/sample.yaml
|
||||
fi
|
||||
|
||||
# configuration files should not be modifiable by grafana user, as this can be a security issue
|
||||
chown -Rh root:$GRAFANA_GROUP /etc/grafana/*
|
||||
chmod 755 /etc/grafana
|
||||
|
@@ -57,6 +57,7 @@ RUN export GF_GID_NAME=$(getent group $GF_GID | cut -d':' -f1) && \
|
||||
"$GF_PATHS_PROVISIONING/dashboards" \
|
||||
"$GF_PATHS_PROVISIONING/notifiers" \
|
||||
"$GF_PATHS_PROVISIONING/plugins" \
|
||||
"$GF_PATHS_PROVISIONING/access-control" \
|
||||
"$GF_PATHS_LOGS" \
|
||||
"$GF_PATHS_PLUGINS" \
|
||||
"$GF_PATHS_DATA" && \
|
||||
|
@@ -44,6 +44,7 @@ RUN export GF_GID_NAME=$(getent group $GF_GID | cut -d':' -f1) && \
|
||||
"$GF_PATHS_PROVISIONING/dashboards" \
|
||||
"$GF_PATHS_PROVISIONING/notifiers" \
|
||||
"$GF_PATHS_PROVISIONING/plugins" \
|
||||
"$GF_PATHS_PROVISIONING/access-control" \
|
||||
"$GF_PATHS_LOGS" \
|
||||
"$GF_PATHS_PLUGINS" \
|
||||
"$GF_PATHS_DATA" && \
|
||||
|
@@ -61,6 +61,11 @@ if [ $1 -eq 1 ] ; then
|
||||
cp /usr/share/grafana/conf/provisioning/plugins/sample.yaml $PROVISIONING_CFG_DIR/plugins/sample.yaml
|
||||
fi
|
||||
|
||||
if [ ! -d $PROVISIONING_CFG_DIR/access-control ]; then
|
||||
mkdir -p $PROVISIONING_CFG_DIR/access-control
|
||||
cp /usr/share/grafana/conf/provisioning/access-control/sample.yaml $PROVISIONING_CFG_DIR/access-control/sample.yaml
|
||||
fi
|
||||
|
||||
# Set user permissions on /var/log/grafana, /var/lib/grafana
|
||||
mkdir -p /var/log/grafana /var/lib/grafana
|
||||
chown -R $GRAFANA_USER:$GRAFANA_GROUP /var/log/grafana /var/lib/grafana
|
||||
|
Reference in New Issue
Block a user