diff --git a/docker/php/bootstrap.sh b/docker/php/bootstrap.sh index 5aaec0b2..006eea80 100755 --- a/docker/php/bootstrap.sh +++ b/docker/php/bootstrap.sh @@ -30,6 +30,11 @@ chgrp www-data /var/www # Initialize an empty robots.txt with the default if it doesn't exist. touch /var/www/robots.txt +# Initialize an empty writable secrests.php with the default if it doesn't exist. +touch /var/www/inc/secrets.php +chown www-data /var/www/inc/secrets.php +chgrp www-data /var/www/inc/secrets.php + # Link the cache and tmp files directory. ln -nfs /var/tmp/leftypol /var/www/tmp diff --git a/install.php b/install.php index 9d3ef19c..6e58d344 100644 --- a/install.php +++ b/install.php @@ -3,7 +3,7 @@ // Installation/upgrade file define('VERSION', '5.1.3'); -if (fopen('inc/instance-config.php' , 'a') === false) { +if (!is_writable('inc/instance-config.php') || !is_writable('inc/')) { print('install.php does not have permission to write to /inc/, without permission the installer cannot continue'); exit(); }