From 7014a5a3ea0feffab9701fdd6b64cc7667a985af Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 30 Jun 2019 17:36:28 +0100 Subject: gentoo resync : 30.06.2019 --- www-apps/phpBB/files/permissions | 19 +++++++++++++++++++ www-apps/phpBB/files/postinstall-en.txt | 30 +++++++++++------------------- 2 files changed, 30 insertions(+), 19 deletions(-) create mode 100755 www-apps/phpBB/files/permissions (limited to 'www-apps/phpBB/files') diff --git a/www-apps/phpBB/files/permissions b/www-apps/phpBB/files/permissions new file mode 100755 index 000000000000..b5c21c879eb1 --- /dev/null +++ b/www-apps/phpBB/files/permissions @@ -0,0 +1,19 @@ +#!/bin/bash -e + +if [[ $1 = install ]]; then + # Ensure database credentials are not world-readable. + chmod -v o= "${MY_INSTALLDIR}"/config.php + + # These paths need to be writeable by the PHP user. + PATHS=( "${MY_INSTALLDIR}"/{cache/,config.php,download/,files/,store/,images/avatars/upload/} ) + + # Assume the PHP user is in the config group. + GID=${VHOST_CONFIG_GID} + + # If that group is root, assume the web server group instead. + [[ ${GID} = 0 || ${GID} = root ]] && GID=${VHOST_SERVER_GID} + + # Make the paths writeable by that group. + chgrp -v "${GID}" "${PATHS[@]}" + chmod -v g+w "${PATHS[@]}" +fi diff --git a/www-apps/phpBB/files/postinstall-en.txt b/www-apps/phpBB/files/postinstall-en.txt index 6787a37ca813..8bdf1386e4de 100644 --- a/www-apps/phpBB/files/postinstall-en.txt +++ b/www-apps/phpBB/files/postinstall-en.txt @@ -1,22 +1,14 @@ -You are almost done! +IMPORTANT! Ensure that the group assigned to group-writeable paths +such as config.php (see above) is one your PHP user is a member +of. This may or may not be your web server group, ${VHOST_SERVER_GID}. +If not, adjust your PHP user and/or reinstall the application with +webapp-config while specifying an appropriate group with -g. Then... - 0. Setup a database (e.g. MySQL: see - http://www.gentoo.org/doc/en/mysql-howto.xml) +1. Set up a database. +2. Continue the installation by visiting the URL in your browser. +3. Delete the "install" folder as follows: - 1. Login on + # cd ${MY_INSTALLDIR} + # rm -rf install - http://${VHOST_HOSTNAME}/${VHOST_APPDIR} - - and finish the installation. - - 2. Move into the directory where you installed phpBB and remove - the "install" folder: - - # cd ${MY_INSTALLDIR} - # rm -rf install - - 3. You can now launch your browser and point it to your phpBB site: - - http://${VHOST_HOSTNAME}/${VHOST_APPDIR} - - Enjoy phpBB! +4. phpBB is now ready to use. Enjoy! -- cgit v1.2.3