]> git.mxchange.org Git - friendica.git/commitdiff
Set permissions
authorMichael <heluecht@pirati.ca>
Mon, 9 May 2022 08:20:09 +0000 (08:20 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 9 May 2022 08:20:09 +0000 (08:20 +0000)
src/Contact/Avatar.php

index 18f63b07b2bccfca79d1d344bbe116e2ee953ada..e0c0f4970dda094f1115237a2b714c00d19acfbb 100644 (file)
@@ -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;