summaryrefslogtreecommitdiff
path: root/www-apps/phpBB/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-06-30 17:36:28 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-06-30 17:36:28 +0100
commit7014a5a3ea0feffab9701fdd6b64cc7667a985af (patch)
treef2cbbaa8bb9209cd15208721103228336149b799 /www-apps/phpBB/files
parent7a86906b67693cc65671d3e1476835d3a7e13092 (diff)
gentoo resync : 30.06.2019
Diffstat (limited to 'www-apps/phpBB/files')
-rwxr-xr-xwww-apps/phpBB/files/permissions19
-rw-r--r--www-apps/phpBB/files/postinstall-en.txt30
2 files changed, 30 insertions, 19 deletions
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!