nextcloud/server · warning · Sabre\DAV\Exception\Forbidden

Permission denied to rename this collection

Error message

Permission denied to rename this collection

What it means

RootCollection::setName() refuses renaming of the comments root with Forbidden (HTTP 403). Sabre maps MOVE-with-destination on a collection to setName, so any attempt to relocate the comments root or its layout fails.

Source

Thrown at apps/dav/lib/Comments/RootCollection.php:167

	 *
	 * This is used to generate the url.
	 *
	 * @return string
	 */
	#[\Override]
	public function getName() {
		return $this->name;
	}

	/**
	 * Renames the node
	 *
	 * @param string $name The new name
	 * @throws Forbidden
	 */
	#[\Override]
	public function setName($name) {
		throw new Forbidden('Permission denied to rename this collection');
	}

	/**
	 * Returns the last modification time, as a unix timestamp
	 *
	 * @return ?int
	 */
	#[\Override]
	public function getLastModified() {
		return null;
	}
}

View on GitHub (pinned to ecdeb153ff)

Solutions

  1. Do not issue MOVE against collection nodes under /dav/comments.
  2. If a different URL is needed, fix the client configuration that builds the URL.
  3. Restrict drag-and-drop operations when the comments tree is mounted.
Defensive patterns

Strategy: validation

Prevention

When it happens

Trigger: MOVE /remote.php/dav/comments with a Destination header attempting to rename or relocate the collection; drag-and-drop reorganization in WebDAV-mounted drives.

Common situations: Sync clients attempting tree reorganization; users mounting the DAV root and moving folders; scripts assuming WebDAV rename works uniformly across all collections.

Related errors


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