From f2f430af5dbfbd22986226be3a0ba9bcf0cb7492 Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Sun, 13 Nov 2022 14:07:40 +0100 Subject: [PATCH] Redirect the logs where they belong --- webmails/Dockerfile | 16 ++++++++++------ webmails/php.ini | 4 +++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/webmails/Dockerfile b/webmails/Dockerfile index 34085f4f..376399bf 100644 --- a/webmails/Dockerfile +++ b/webmails/Dockerfile @@ -41,9 +41,6 @@ RUN set -euxo pipefail \ ; cd roundcube \ ; rm -rf CHANGELOG.md SECURITY.md INSTALL LICENSE README.md UPGRADING composer.json-dist installer composer.* \ ; ln -sf index.php /var/www/roundcube/public_html/sso.php \ - ; chown -R root:root /var/www/roundcube/ \ - ; chown -R mailu:mailu /var/www/roundcube/temp /var/www/roundcube/logs \ - ; chmod -R a+rX /var/www/roundcube \ ; rm -rf plugins/{autologon,example_addressbook,http_authentication,krb_authentication,new_user_identity,password,redundant_attachments,squirrelmail_usercopy,userinfo,virtuser_file,virtuser_query} COPY roundcube/config/config.inc.php /conf/ @@ -60,9 +57,7 @@ RUN set -euxo pipefail \ ; curl -sLo /dev/shm/snappymail.tgz ${SNAPPYMAIL_URL} \ ; curl -sLo /dev/shm/snappymail.tgz.asc ${SNAPPYMAIL_URL}.asc \ ; gpg --status-fd 1 --verify /dev/shm/snappymail.tgz.asc \ - ; tar xzf /dev/shm/snappymail.tgz \ - ; chmod -R a+rX /var/www/snappymail \ - ; chown -R root:root /var/www/snappymail + ; tar xzf /dev/shm/snappymail.tgz # SnappyMail login COPY snappymail/login/include.php /var/www/snappymail/ @@ -72,6 +67,15 @@ COPY snappymail/login/sso.php /var/www/snappymail/ COPY snappymail/defaults/application.ini /defaults/ COPY snappymail/defaults/default.json /defaults/ +# set perms +RUN set -euxo pipefail \ + ; chmod -R a+rX /var/www/snappymail \ + ; chown -R root:root /var/www/snappymail \ + ; chown -R mailu:mailu /var/www/snappymail/data \ + ; chown -R root:root /var/www/roundcube/ \ + ; chown -R mailu:mailu /var/www/roundcube/temp /var/www/roundcube/logs \ + ; chmod -R a+rX /var/www/roundcube + # common COPY start.py / COPY php.ini /defaults/ diff --git a/webmails/php.ini b/webmails/php.ini index 884dda72..d9ba892c 100644 --- a/webmails/php.ini +++ b/webmails/php.ini @@ -5,7 +5,9 @@ post_max_size = {{ MAX_FILESIZE }}M session.auto_start=Off mbstring.func_overload=Off file_uploads=On -error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT +error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE display_errors=Off log_errors=On zlib.output_compression=Off +access.log = /dev/fd/2 +error_log = /dev/fd/2