File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -314,7 +314,14 @@ public static function checkServer(SystemConfig $config) {
314314 [$ urlGenerator ->linkToDocs ('admin-dir_permissions ' )])
315315 ];
316316 }
317- } elseif (!is_writable ($ CONFIG_DATADIRECTORY ) || !is_readable ($ CONFIG_DATADIRECTORY )) {
317+ } elseif (!is_readable ($ CONFIG_DATADIRECTORY )) {
318+ $ permissionsHint = $ l ->t ('Permissions can usually be fixed by giving the web server write access to the root directory. See %s. ' ,
319+ [$ urlGenerator ->linkToDocs ('admin-dir_permissions ' )]);
320+ $ errors [] = [
321+ 'error ' => $ l ->t ('Your data directory is not readable. ' ),
322+ 'hint ' => $ permissionsHint
323+ ];
324+ } elseif (!is_writable ($ CONFIG_DATADIRECTORY )) {
318325 // is_writable doesn't work for NFS mounts, so try to write a file and check if it exists.
319326 $ testFile = sprintf ('%s/%s.tmp ' , $ CONFIG_DATADIRECTORY , uniqid ('data_dir_writability_test_ ' ));
320327 $ handle = fopen ($ testFile , 'w ' );
Original file line number Diff line number Diff line change @@ -148,9 +148,9 @@ public function testDataDirWritable(): void {
148148 }
149149
150150 /**
151- * Tests an error is given when the datadir is not writable
151+ * Tests an error is given when the datadir is not readable
152152 */
153- public function testDataDirNotWritable (): void {
153+ public function testDataDirNotReadable (): void {
154154 chmod ($ this ->datadir , 0300 );
155155 $ result = \OC_Util::checkServer ($ this ->getConfig ([
156156 'installed ' => true ,
@@ -163,7 +163,7 @@ public function testDataDirNotWritable(): void {
163163 * Tests no error is given when the datadir is not writable during setup
164164 */
165165 public function testDataDirNotWritableSetup (): void {
166- chmod ($ this ->datadir , 0300 );
166+ chmod ($ this ->datadir , 0500 );
167167 $ result = \OC_Util::checkServer ($ this ->getConfig ([
168168 'installed ' => false ,
169169 'version ' => implode ('. ' , Util::getVersion ())
You can’t perform that action at this time.
0 commit comments