summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2019-06-24 22:27:39 +0100
committerJames Le Cuirot <chewi@gentoo.org>2019-06-24 22:27:39 +0100
commit7180d5f150295b7a8f5fd492a637f8a7b10f0253 (patch)
treec3a90656aa08861a8a138efdf46b118c79ad2926 /www-apps/phpBB/files/permissions
parentdev-python/jsonpickle: Bump to version 1.2 (diff)
downloadgentoo-7180d5f150295b7a8f5fd492a637f8a7b10f0253.tar.gz
gentoo-7180d5f150295b7a8f5fd492a637f8a7b10f0253.tar.bz2
gentoo-7180d5f150295b7a8f5fd492a637f8a7b10f0253.zip
www-apps/phpBB: Version bump to 3.2.7
Bug: https://bugs.gentoo.org/678512 Closes: https://bugs.gentoo.org/615182 Package-Manager: Portage-2.3.67, Repoman-2.3.13 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'www-apps/phpBB/files/permissions')
-rwxr-xr-xwww-apps/phpBB/files/permissions19
1 files changed, 19 insertions, 0 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