Filesystem storage: set permission on folders and files
files are set 0660 and folders 0770. fix #6545
This commit is contained in:
parent
8a5418ebee
commit
ec94318a35
1 changed files with 4 additions and 0 deletions
|
@ -69,10 +69,13 @@ class Filesystem implements IStorage
|
||||||
if (!is_file($path . '/index.html')) {
|
if (!is_file($path . '/index.html')) {
|
||||||
file_put_contents($path . '/index.html', '');
|
file_put_contents($path . '/index.html', '');
|
||||||
}
|
}
|
||||||
|
chmod($path . '/index.html', 0660);
|
||||||
|
chmod($path, 0770);
|
||||||
$path = dirname($path);
|
$path = dirname($path);
|
||||||
}
|
}
|
||||||
if (!is_file($path . '/index.html')) {
|
if (!is_file($path . '/index.html')) {
|
||||||
file_put_contents($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);
|
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));
|
throw new StorageException(L10n::t('Filesystem storage failed to save data to "%s". Check your write permissions', $file));
|
||||||
}
|
}
|
||||||
|
chmod($file, 0660);
|
||||||
return $ref;
|
return $ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue