nextcloud/server · error · OCP\FilesMetadata\Exceptions\FilesMetadataException

you do not have enough rights to update '

Error message

you do not have enough rights to update '

What it means

Error "you do not have enough rights to update '" thrown in nextcloud/server.

Source

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

		$filesMetadataManager = $this->initFilesMetadataManager();
		$knownMetadata = $filesMetadataManager->getKnownMetadata();

		foreach ($propPatch->getRemainingMutations() as $mutation) {
			if (!str_starts_with($mutation, self::FILE_METADATA_PREFIX)) {
				continue;
			}

			$propPatch->handle(
				$mutation,
				function (mixed $value) use ($accessRight, $knownMetadata, $node, $mutation, $filesMetadataManager): bool {
					/** @var FilesMetadata $metadata */
					$metadata = $filesMetadataManager->getMetadata((int)$node->getFileId(), true);
					$metadata->setStorageId($node->getNode()->getStorage()->getCache()->getNumericStorageId());
					$metadataKey = substr($mutation, strlen(self::FILE_METADATA_PREFIX));

					// confirm metadata key is editable via PROPPATCH
					if ($knownMetadata->getEditPermission($metadataKey) < $accessRight) {
						throw new FilesMetadataException('you do not have enough rights to update \'' . $metadataKey . '\' on this node');
					}

					if ($value === null) {
						$metadata->unset($metadataKey);
						$filesMetadataManager->saveMetadata($metadata);
						return true;
					}

					// If the metadata is unknown, it defaults to string.
					try {
						$type = $knownMetadata->getType($metadataKey);
					} catch (FilesMetadataNotFoundException) {
						$type = IMetadataValueWrapper::TYPE_STRING;
					}

					switch ($type) {
						case IMetadataValueWrapper::TYPE_STRING:
							$metadata->setString($metadataKey, $value, $knownMetadata->isIndex($metadataKey));

View on GitHub (pinned to ecdeb153ff)

When it happens

Trigger: Thrown at apps/dav/lib/Connector/Sabre/FilesPlugin.php:659 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/db06c12427674775. Report an issue: GitHub.