From 3d6712ef50fdcb85bfda838cce3612cd8501be86 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 22 Jul 2019 08:57:51 +0200 Subject: [PATCH] fix used open_basedir --- Dockerfile.linux.amd64 | 8 +++++++- overlay/etc/templates/php.ini.tmpl | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile.linux.amd64 b/Dockerfile.linux.amd64 index 7d04abd..34e677d 100644 --- a/Dockerfile.linux.amd64 +++ b/Dockerfile.linux.amd64 @@ -23,7 +23,13 @@ RUN apk --update add --virtual .build-deps tar curl && \ curl -SsL -o /etc/php7/browscap.ini https://browscap.org/stream?q=Lite_PHP_BrowsCapINI && \ apk del .build-deps && \ rm -rf /var/cache/apk/* && \ - rm -rf /tmp/* + rm -rf /tmp/* && \ + mkdir -p /var/lib/php/tmp_upload && \ + mkdir -p /var/lib/php/soap_cache && \ + mkdir -p /var/lib/php/session && \ + chown -R nginx:nginx /var/lib/php/tmp_upload && \ + chown -R nginx:nginx /var/lib/php/soap_cache && \ + chown -R nginx:nginx /var/lib/php/session ADD overlay/ / diff --git a/overlay/etc/templates/php.ini.tmpl b/overlay/etc/templates/php.ini.tmpl index 72b234a..3f515ba 100644 --- a/overlay/etc/templates/php.ini.tmpl +++ b/overlay/etc/templates/php.ini.tmpl @@ -21,7 +21,7 @@ serialize_precision = 17 open_basedir = "/var/www/app:/var/lib/php/tmp_upload:/var/lib/php/session:/var/lib/php/soap_cache" -disable_functions = system, exec, shell_exec, phpinfo, show_source, highlight_file, popen, proc_open, fopen_with_path, dbmopen, dbase_open, putenv, move_uploaded_file, mkdir, rmdir, chmod, rename, filepro, filepro_rowcount, filepro_retrieve, posix_mkfifo +disable_functions = system, exec, shell_exec, phpinfo, show_source, highlight_file, popen, proc_open, fopen_with_path, dbmopen, dbase_open, putenv, move_uploaded_file, chmod, rename, filepro, filepro_rowcount, filepro_retrieve, posix_mkfifo disable_classes = ;highlight.string = #DD0000