]> arthur.barton.de Git - netdata.git/blobdiff - netdata-installer.sh
Merge pull request #1460 from vlvkobal/master
[netdata.git] / netdata-installer.sh
index aae4e6281143a5214abe1df430f333364fef5062..7487dbec756194236e2a2974a7af39daf6afa1b5 100755 (executable)
@@ -657,7 +657,7 @@ portable_add_user_to_group() {
     fi
 }
 
-run find ./system/ -type f -a \! -name \*.in -a \! -name Makefile\* -a \! -name \*.conf  -a \! -name \*.service -exec chmod 755 {} \;
+run find ./system/ -type f -a \! -name \*.in -a \! -name Makefile\* -a \! -name \*.conf -a \! -name \*.service -a \! -name \*.logrotate -exec chmod 755 {} \;
 
 NETDATA_ADDED_TO_DOCKER=0
 NETDATA_ADDED_TO_NGINX=0
@@ -673,6 +673,12 @@ if [ ${UID} -eq 0 ]
         echo >&2 "Adding netdata logrotate configuration ..."
         run cp system/netdata.logrotate /etc/logrotate.d/netdata
     fi
+    
+    if [ -f /etc/logrotate.d/netdata ]
+        then
+        echo >&2 "Fixing netdata logrotate permissions ..."
+        run chmod 644 /etc/logrotate.d/netdata
+    fi
 fi
 
 
@@ -784,6 +790,9 @@ do
     #run find "${x}" -type d -exec chmod 0770 {} \;
 done
 
+run chown "${NETDATA_USER}:root" "${NETDATA_LOG_DIR}"
+run chmod 755 "${NETDATA_LOG_DIR}"
+
 # --- plugins ----
 
 if [ ${UID} -eq 0 ]