nextcloud/server · error · Sabre\DAV\Exception\Forbidden
cannot be deleted
Error message
cannot be deleted
What it means
Error " cannot be deleted" thrown in nextcloud/server.
Source
Thrown at apps/dav/lib/Connector/Sabre/FilesPlugin.php:219
if (!$sourceNode instanceof Node) {
return;
}
// First check copyable (move only needs additional delete permission)
$this->checkCopy($source, $target);
[$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) {View on GitHub (pinned to ecdeb153ff)
When it happens
Trigger: Thrown at apps/dav/lib/Connector/Sabre/FilesPlugin.php:219 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/892a5fb6012b2048.
Report an issue: GitHub.