diff --git a/Dockerfile b/Dockerfile index 7b59a38..c9acaf0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,10 +30,7 @@ RUN mv /etc/nginx/access_logd_`access_log -v`.conf /etc/nginx/access_logd.conf RUN chown -R nginx:nginx /etc/nginx RUN nginx -t -# access_logd runs as nobody but the socket can be written to by nginx -RUN delgroup nobody nobody -RUN addgroup nobody www-data -RUN chown nobody:www-data /var/lib/access_log.sqlite3 +RUN chown nginx:nginx /var/lib/access_log.sqlite3 # Shared configuration VOLUME /etc/nginx/sites diff --git a/access_logd.sh b/access_logd.sh index 4519ab5..9f9f975 100755 --- a/access_logd.sh +++ b/access_logd.sh @@ -14,7 +14,7 @@ case $1 in install -m 640 -o nobody /var/lib/access_log.sqlite3 /var/log/access_log.sqlite3 # Read from fifo and load into database - daemonize -p /run/access_logd.pid -u nobody /usr/local/bin/syslogize /usr/bin/access_log $ACCESS_LOGS_FLAGS + daemonize -p /run/access_logd.pid -u nginx /usr/local/bin/syslogize /usr/bin/access_log $ACCESS_LOGS_FLAGS ;; stop) test -f $pid || exit 0