|
@@ 752-757 (lines=6) @@
|
| 749 |
|
chmod($dataDirectory, 0770); |
| 750 |
|
clearstatcache(); |
| 751 |
|
$perms = substr(decoct(@fileperms($dataDirectory)), -3); |
| 752 |
|
if (substr($perms, 2, 1) != '0') { |
| 753 |
|
$errors[] = array( |
| 754 |
|
'error' => $l->t('Data directory (%s) is readable by other users', array($dataDirectory)), |
| 755 |
|
'hint' => $permissionsModHint |
| 756 |
|
); |
| 757 |
|
} |
| 758 |
|
} |
| 759 |
|
} |
| 760 |
|
return $errors; |
|
@@ 773-779 (lines=7) @@
|
| 770 |
|
public static function checkDataDirectoryValidity($dataDirectory) { |
| 771 |
|
$l = \OC::$server->getL10N('lib'); |
| 772 |
|
$errors = array(); |
| 773 |
|
if (!file_exists($dataDirectory . '/.ocdata')) { |
| 774 |
|
$errors[] = array( |
| 775 |
|
'error' => $l->t('Data directory (%s) is invalid', array($dataDirectory)), |
| 776 |
|
'hint' => $l->t('Please check that the data directory contains a file' . |
| 777 |
|
' ".ocdata" in its root.') |
| 778 |
|
); |
| 779 |
|
} |
| 780 |
|
return $errors; |
| 781 |
|
} |
| 782 |
|
|