From: Mikael Nordfeldth Date: Mon, 7 Mar 2016 22:23:32 +0000 (+0100) Subject: chmod 0775 directories we create X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cfc82591daaf2e6e5acdb8cc7002e81bd2a14267;p=quix0rs-gnu-social.git 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. --- 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'))) {