Commits

Zhang Huangbin  committed d27fb93

Fixed: Apache daemon user doesn't have permission to read Apache log files in Awstats cron job.

  • Participants
  • Parent commits 3bb7047

Comments (0)

Files changed (2)

File iRedMail/ChangeLog

       msgs.time_num), quarantine.mail_id.
       Thanks rjnena <rjnena@gmail>, David <dcharbonnier@gmail>.
     * Fixed:
+      + Apache daemon user doesn't have permission to read Apache log files in
+        Awstats's cron job.
       + Incorrect per-user realtime mailbox quota if loggin in with shadowAddress.
         OpenLDAP backend only. Thanks tmihalicek <tomislav.mihalicek @gmail>.
       + Incorrect per-user sieve_dir setting in Dovecot.

File iRedMail/functions/awstats.sh

     #    export AWSTATS_CGI_DIR="${AWSTATS_CGI_DIR}/awstats"
     #fi
 
+    # Assign Apache daemon user to group 'adm', so that Awstats cron job can read log files.
+    if [ X"${DISTRO}" == X"DEBIAN" -o X"${DISTRO}" == X"UBUNTU" ]; then
+        usermod -g adm ${HTTPD_USER} >/dev/null
+    fi
+
     cat > ${AWSTATS_HTTPD_CONF} <<EOF
 ${CONF_MSG}
 # Note: Please refer to ${HTTPD_SSL_CONF} for SSL/TLS setting.