From: fabrixxm Date: Tue, 29 Jan 2019 11:35:30 +0000 (+0100) Subject: Filesystem storage: set permission on folders and files X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ec94318a353b662ddc1075c73986096218cbf3e1;p=friendica.git Filesystem storage: set permission on folders and files files are set 0660 and folders 0770. fix #6545 --- diff --git a/src/Model/Storage/Filesystem.php b/src/Model/Storage/Filesystem.php index bb68731cd0..0ea3dafab1 100644 --- a/src/Model/Storage/Filesystem.php +++ b/src/Model/Storage/Filesystem.php @@ -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; }