From cfc82591daaf2e6e5acdb8cc7002e81bd2a14267 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 7 Mar 2016 23:23:32 +0100 Subject: [PATCH] chmod 0775 directories we create Security for the 'g+rx' should be handle by having the parent directory inaccessible for global users, which is usually the case. --- lib/gnusocial.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/gnusocial.php b/lib/gnusocial.php index 3450b04888..789cece2be 100644 --- a/lib/gnusocial.php +++ b/lib/gnusocial.php @@ -461,6 +461,9 @@ class GNUsocial if (!mkdir($dir)) { throw new ConfigException('Could not create directory for '._ve($description).': '._ve($dir)); } + if (!chmod($dir, 0775)) { + common_log(LOG_WARNING, 'Could not chmod 0775 on directory for '._ve($description).': '._ve($dir)); + } } if (!is_array(common_config('public', 'autosource'))) {