Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions config/config.sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,18 @@
*/
'check_for_working_htaccess' => true,

/**
* In rare setups (e.g. on Openshift or docker on windows) the permissions check
* might block the installation while the underlying system offers no means to
* "correct" the permissions. In this case, set the value to false.
*
* In regular cases, if issues with permissions are encountered they should be
* adjusted accordingly. Changing the flag is discouraged.
*
* Defaults to ``true``
*/
'check_data_directory_permissions' => true,

/**
* In certain environments it is desired to have a read-only configuration file.
* When this switch is set to ``true`` Nextcloud will not verify whether the
Expand Down
5 changes: 4 additions & 1 deletion lib/private/legacy/util.php
Original file line number Diff line number Diff line change
Expand Up @@ -979,8 +979,11 @@ public static function checkDatabaseVersion() {
* @return array arrays with error messages and hints
*/
public static function checkDataDirectoryPermissions($dataDirectory) {
if(\OC::$server->getConfig()->getSystemValue('check_data_directory_permissions', true) === false) {
return [];
}
$l = \OC::$server->getL10N('lib');
$errors = array();
$errors = [];
$permissionsModHint = $l->t('Please change the permissions to 0770 so that the directory'
. ' cannot be listed by other users.');
$perms = substr(decoct(@fileperms($dataDirectory)), -3);
Expand Down