nextcloud/server · error · OCA\DAV\Connector\Sabre\Exception\Forbidden

No read permissions

Error message

No read permissions

What it means

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.

Source

Thrown at apps/dav/lib/Connector/Sabre/Directory.php:264

	 * Returns an array with all the child nodes
	 *
	 * @return \Sabre\DAV\INode[]
	 * @throws \Sabre\DAV\Exception\Locked
	 * @throws Forbidden
	 */
	#[\Override]
	public function getChildren() {
		if (!is_null($this->dirContent)) {
			return $this->dirContent;
		}
		try {
			if (!$this->info->isReadable()) {
				// return 403 instead of 404 because a 404 would make
				// the caller believe that the collection itself does not exist
				if (Server::get(IAppManager::class)->isEnabledForAnyone('files_accesscontrol')) {
					throw new Forbidden('No read permissions. This might be caused by files_accesscontrol, check your configured rules');
				} else {
					throw new Forbidden('No read permissions');
				}
			}
			$folderContent = $this->getNode()->getDirectoryListing();
		} catch (LockedException $e) {
			throw new Locked();
		}

		$nodes = [];
		$request = Server::get(IRequest::class);
		$l10nFactory = Server::get(IFactory::class);
		$l10n = $l10nFactory->get(Application::APP_ID);
		foreach ($folderContent as $info) {
			$node = $this->getChild($info->getName(), $info, $request, $l10n);
			$nodes[] = $node;
		}
		$this->dirContent = $nodes;
		return $this->dirContent;
	}

View on GitHub (pinned to ecdeb153ff)

Solutions

  1. Fix the underlying permission: restore owner and mode on the storage, or grant read on the external mount.
  2. Check that share permission bits include read.
  3. Use the external storage admin page and occ files:scan to verify mount health and visibility.
Defensive patterns

Strategy: try-catch

Try / catch

try {
    $children = $client->propfind($dirUrl, [], 1);
} catch (Forbidden $e) { // HTTP 403 without the accesscontrol hint
    reportStoragePermissionProblem($dirUrl); // storage/share permission issue
}

Prevention

When it happens

Trigger: 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.

Common situations: chmod/chown operations inside data dirs during manual server surgery; external storage credential or permission changes on the backend; shares granted without read permission.

Related errors


AI-assisted analysis of nextcloud/server@ecdeb153ff (2026-08-17). Data as JSON: /api/errors/d32c06993d70cb97. Report an issue: GitHub.