{"record":{"id":"8597bd41bd4e43c5","repo":"apache/hadoop","slug":"the-operation-is-not-allowed-because-the-path","errorCode":null,"errorMessage":"The operation is not allowed because the path: {} is a mount point","messagePattern":"The operation is not allowed because the path: (.+?) is a mount point","errorType":"exception","errorClass":"AccessControlException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java","lineNumber":2177,"sourceCode":"    try {\n      if (failIfLocked) {\n        // check if there is any mount point under the path\n        final List<String> mountPoints =\n            this.subclusterResolver.getMountPoints(path);\n        if (mountPoints != null) {\n          StringBuilder sb = new StringBuilder();\n          sb.append(\"The operation is not allowed because \");\n          if (mountPoints.isEmpty()) {\n            sb.append(\"the path: \")\n                .append(path)\n                .append(\" is a mount point\");\n          } else {\n            sb.append(\"there are mount points: \")\n                .append(String.join(\",\", mountPoints))\n                .append(\" under the path: \")\n                .append(path);\n          }\n          throw new AccessControlException(sb.toString());\n        }\n      }\n\n      // Check the location for this path\n      final PathLocation location =\n          this.subclusterResolver.getDestinationForPath(path);\n      if (location == null) {\n        throw new NoLocationException(path, this.subclusterResolver.getClass());\n      }\n\n      // We may block some write operations\n      if (opCategory.get() == OperationCategory.WRITE) {\n        // Check if the path is in a read only mount point\n        if (isPathReadOnly(path)) {\n          if (this.rpcMonitor != null) {\n            this.rpcMonitor.routerFailureReadOnly();\n          }\n          throw new IOException(path + \" is in a read only mount point\");","sourceCodeStart":2159,"sourceCodeEnd":2195,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java#L2159-L2195","documentation":"Error \"The operation is not allowed because the path: {} is a mount point\" thrown in apache/hadoop.","triggerScenarios":"A write/metadata operation was attempted directly on a path that is a mount point.","commonSituations":"Users or jobs trying to delete/rename/chmod the mount point directory itself rather than content beneath it.","solutions":["Target the underlying destination path in the subcluster directly instead of the mount point.","If the intent was to modify the mount itself, use dfsrouteradmin mount table commands.","Choose a non-mount-point path for the operation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}