{"record":{"id":"d32c06993d70cb97","repo":"nextcloud/server","slug":"no-read-permissions","errorCode":null,"errorMessage":"No read permissions","messagePattern":"No read permissions","errorType":"exception","errorClass":"OCA\\DAV\\Connector\\Sabre\\Exception\\Forbidden","httpStatus":403,"severity":"error","filePath":"apps/dav/lib/Connector/Sabre/Directory.php","lineNumber":264,"sourceCode":"\t * Returns an array with all the child nodes\n\t *\n\t * @return \\Sabre\\DAV\\INode[]\n\t * @throws \\Sabre\\DAV\\Exception\\Locked\n\t * @throws Forbidden\n\t */\n\t#[\\Override]\n\tpublic function getChildren() {\n\t\tif (!is_null($this->dirContent)) {\n\t\t\treturn $this->dirContent;\n\t\t}\n\t\ttry {\n\t\t\tif (!$this->info->isReadable()) {\n\t\t\t\t// return 403 instead of 404 because a 404 would make\n\t\t\t\t// the caller believe that the collection itself does not exist\n\t\t\t\tif (Server::get(IAppManager::class)->isEnabledForAnyone('files_accesscontrol')) {\n\t\t\t\t\tthrow new Forbidden('No read permissions. This might be caused by files_accesscontrol, check your configured rules');\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Forbidden('No read permissions');\n\t\t\t\t}\n\t\t\t}\n\t\t\t$folderContent = $this->getNode()->getDirectoryListing();\n\t\t} catch (LockedException $e) {\n\t\t\tthrow new Locked();\n\t\t}\n\n\t\t$nodes = [];\n\t\t$request = Server::get(IRequest::class);\n\t\t$l10nFactory = Server::get(IFactory::class);\n\t\t$l10n = $l10nFactory->get(Application::APP_ID);\n\t\tforeach ($folderContent as $info) {\n\t\t\t$node = $this->getChild($info->getName(), $info, $request, $l10n);\n\t\t\t$nodes[] = $node;\n\t\t}\n\t\t$this->dirContent = $nodes;\n\t\treturn $this->dirContent;\n\t}","sourceCodeStart":246,"sourceCodeEnd":282,"githubUrl":"https://github.com/nextcloud/server/blob/ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3/apps/dav/lib/Connector/Sabre/Directory.php#L246-L282","documentation":"The same readability check as the files_accesscontrol variant, thrown when that app is not enabled for anyone: the storage layer itself denies read on the directory (filesystem permissions, external storage ACLs, or a share mounted without read permission). 403 signals the folder exists but cannot be listed.","triggerScenarios":"PROPFIND on a directory with unreadable mode/ownership on local storage; an SMB/SFTP mount where the backend account lacks read rights; a received share mounted without the read permission bit.","commonSituations":"chmod/chown operations inside data dirs during manual server surgery; external storage credential or permission changes on the backend; shares granted without read permission.","solutions":["Fix the underlying permission: restore owner and mode on the storage, or grant read on the external mount.","Check that share permission bits include read.","Use the external storage admin page and occ files:scan to verify mount health and visibility."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    $children = $client->propfind($dirUrl, [], 1);\n} catch (Forbidden $e) { // HTTP 403 without the accesscontrol hint\n    reportStoragePermissionProblem($dirUrl); // storage/share permission issue\n}","preventionTips":["Verify share permission bits include read before listing via DAV.","Check external storage health and credentials after rotations.","Avoid manual chmod/chown inside data directories."],"tags":["dav","files","permissions","external-storage","forbidden"],"backgroundTag":"permission-denied","analyzedSha":"ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3","analyzedAt":"2026-08-17T01:36:13.386Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}