{"record":{"id":"db06c12427674775","repo":"nextcloud/server","slug":"you-do-not-have-enough-rights-to-update","errorCode":null,"errorMessage":"you do not have enough rights to update '","messagePattern":"you do not have enough rights to update '","errorType":"exception","errorClass":"OCP\\FilesMetadata\\Exceptions\\FilesMetadataException","httpStatus":null,"severity":"error","filePath":"apps/dav/lib/Connector/Sabre/FilesPlugin.php","lineNumber":659,"sourceCode":"\t\t$filesMetadataManager = $this->initFilesMetadataManager();\n\t\t$knownMetadata = $filesMetadataManager->getKnownMetadata();\n\n\t\tforeach ($propPatch->getRemainingMutations() as $mutation) {\n\t\t\tif (!str_starts_with($mutation, self::FILE_METADATA_PREFIX)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$propPatch->handle(\n\t\t\t\t$mutation,\n\t\t\t\tfunction (mixed $value) use ($accessRight, $knownMetadata, $node, $mutation, $filesMetadataManager): bool {\n\t\t\t\t\t/** @var FilesMetadata $metadata */\n\t\t\t\t\t$metadata = $filesMetadataManager->getMetadata((int)$node->getFileId(), true);\n\t\t\t\t\t$metadata->setStorageId($node->getNode()->getStorage()->getCache()->getNumericStorageId());\n\t\t\t\t\t$metadataKey = substr($mutation, strlen(self::FILE_METADATA_PREFIX));\n\n\t\t\t\t\t// confirm metadata key is editable via PROPPATCH\n\t\t\t\t\tif ($knownMetadata->getEditPermission($metadataKey) < $accessRight) {\n\t\t\t\t\t\tthrow new FilesMetadataException('you do not have enough rights to update \\'' . $metadataKey . '\\' on this node');\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($value === null) {\n\t\t\t\t\t\t$metadata->unset($metadataKey);\n\t\t\t\t\t\t$filesMetadataManager->saveMetadata($metadata);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the metadata is unknown, it defaults to string.\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$type = $knownMetadata->getType($metadataKey);\n\t\t\t\t\t} catch (FilesMetadataNotFoundException) {\n\t\t\t\t\t\t$type = IMetadataValueWrapper::TYPE_STRING;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch ($type) {\n\t\t\t\t\t\tcase IMetadataValueWrapper::TYPE_STRING:\n\t\t\t\t\t\t\t$metadata->setString($metadataKey, $value, $knownMetadata->isIndex($metadataKey));","sourceCodeStart":641,"sourceCodeEnd":677,"githubUrl":"https://github.com/nextcloud/server/blob/ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3/apps/dav/lib/Connector/Sabre/FilesPlugin.php#L641-L677","documentation":"Error \"you do not have enough rights to update '\" thrown in nextcloud/server.","triggerScenarios":"Thrown at apps/dav/lib/Connector/Sabre/FilesPlugin.php:659 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ecdeb153ffdf227235c9a7e2d13dbe0f9c817bc3","analyzedAt":"2026-08-17T01:36:13.386Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}