when installing as non-root, use the default user group
Costa Tsaousis (ktsaou) committed
Jan 20, 2018 at 18:41 UTC
4ffeeeb69e573c31cc44e8d181ed6196b19460ec
1 file changed
+2
-1
netdata-installer.sh
+2
-1
@@ -677,10 +677,11 @@ config_option() {
677
if [ "${UID}" = "0" ]
678
then
679
NETDATA_USER="$( config_option "global" "run as user" "netdata" )"
680
+ NETDATA_GROUP="${NETDATA_USER}"
681
else
682
NETDATA_USER="${USER}"
683
+ NETDATA_GROUP="$(id -g -n ${NETDATA_USER})"
684
fi
683
-NETDATA_GROUP="${NETDATA_USER}"
685
686
# the owners of the web files
687
NETDATA_WEB_USER="$( config_option "web" "web files owner" "${NETDATA_USER}" )"