]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Storage/Filesystem.php
Filesystem storage: set permission on folders and files
[friendica.git] / src / Model / Storage / Filesystem.php
index bb68731cd04510168367e988968cd08f774b517b..0ea3dafab133587ad3c27226344ca8fc254b8d22 100644 (file)
@@ -69,10 +69,13 @@ class Filesystem implements IStorage
                        if (!is_file($path . '/index.html')) {
                                file_put_contents($path . '/index.html', '');
                        }
+                       chmod($path . '/index.html', 0660);
+                       chmod($path, 0770);
                        $path = dirname($path);
                }
                if (!is_file($path . '/index.html')) {
                        file_put_contents($path . '/index.html', '');
+                       chmod($path . '/index.html', 0660);
                }
        }
 
@@ -100,6 +103,7 @@ class Filesystem implements IStorage
                        Logger::log('Failed to write data to ' . $file);
                        throw new StorageException(L10n::t('Filesystem storage failed to save data to "%s". Check your write permissions', $file));
                }
+               chmod($file, 0660);
                return $ref;
        }