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

cannot be moved to it's parent

Error message

 cannot be moved to it's parent

What it means

Error " cannot be moved to it's parent" thrown in nextcloud/server.

Source

Thrown at apps/dav/lib/Connector/Sabre/FilesPlugin.php:225

		[$sourceDir] = \Sabre\Uri\split($source);
		[$destinationDir, ] = \Sabre\Uri\split($target);

		if ($sourceDir === $destinationDir) {
			if (!$sourceNode->canRename()) {
				throw new Forbidden($source . ' cannot be renamed');
			}
		} else {
			// The source needs to be deletable for moving
			$sourceNodeFileInfo = $sourceNode->getFileInfo();
			if (!$sourceNodeFileInfo->isDeletable()) {
				throw new Forbidden($source . ' cannot be deleted');
			}
		}

		// The source is not allowed to be the parent of the target
		if (str_starts_with($source, $target . '/')) {
			throw new Forbidden($source . ' cannot be moved to it\'s parent');
		}
	}

	/**
	 * This sets a cookie to be able to recognize the start of the download
	 * the content must not be longer than 32 characters and must only contain
	 * alphanumeric characters
	 *
	 * @param RequestInterface $request
	 * @param ResponseInterface $response
	 */
	public function handleDownloadToken(RequestInterface $request, ResponseInterface $response) {
		$queryParams = $request->getQueryParameters();

		/**
		 * this sets a cookie to be able to recognize the start of the download
		 * the content must not be longer than 32 characters and must only contain
		 * alphanumeric characters

View on GitHub (pinned to ecdeb153ff)

When it happens

Trigger: Thrown at apps/dav/lib/Connector/Sabre/FilesPlugin.php:225 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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