From 9d1ff0a4cee01232be08e0b25727c4dacbd841c2 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 9 May 2022 08:20:09 +0000 Subject: [PATCH] Set permissions --- src/Contact/Avatar.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Contact/Avatar.php b/src/Contact/Avatar.php index 18f63b07b2..e0c0f4970d 100644 --- a/src/Contact/Avatar.php +++ b/src/Contact/Avatar.php @@ -114,10 +114,14 @@ class Avatar DI::profiler()->startRecording('file'); if (!file_exists($dirpath)) { - mkdir($dirpath, 0777, true); + mkdir($dirpath, 0775, true); + } else { + chmod($dirpath, 0775); } file_put_contents($filepath, $image->asString()); + chmod($filepath, 0775); + DI::profiler()->stopRecording(); return DI::baseUrl() . $path;