{"record":{"id":"b1eeb8022624bb0a","repo":"apache/hadoop","slug":"is-not-the-root-of-an-encryption-zone-do-you-m","errorCode":null,"errorMessage":"{} is not the root of an encryption zone. Do you mean {}?","messagePattern":"(.+?) is not the root of an encryption zone\\. Do you mean (.+?)\\?","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java","lineNumber":3124,"sourceCode":"        }\n        throw new UnsupportedOperationException(\"Cannot provisionEZTrash \" +\n            \"through a symlink to a non-DistributedFileSystem: \" + fs + \" -> \"\n            + p);\n      }\n    }.resolve(this, absF);\n  }\n\n  private void provisionEZTrash(String path, FsPermission trashPermission)\n      throws IOException {\n    // make sure the path is an EZ\n    EncryptionZone ez = dfs.getEZForPath(path);\n    if (ez == null) {\n      throw new IllegalArgumentException(path + \" is not an encryption zone.\");\n    }\n\n    String ezPath = ez.getPath();\n    if (!path.toString().equals(ezPath)) {\n      throw new IllegalArgumentException(path + \" is not the root of an \" +\n          \"encryption zone. Do you mean \" + ez.getPath() + \"?\");\n    }\n\n    // check if the trash directory exists\n    Path trashPath = new Path(ez.getPath(), FileSystem.TRASH_PREFIX);\n    try {\n      FileStatus trashFileStatus = getFileStatus(trashPath);\n      String errMessage = \"Will not provision new trash directory for \" +\n          \"encryption zone \" + ez.getPath() + \". Path already exists.\";\n      if (!trashFileStatus.isDirectory()) {\n        errMessage += \"\\r\\n\" +\n            \"Warning: \" + trashPath.toString() + \" is not a directory\";\n      }\n      if (!trashFileStatus.getPermission().equals(trashPermission)) {\n        errMessage += \"\\r\\n\" +\n            \"Warning: the permission of \" +\n            trashPath.toString() + \" is not \" + trashPermission;\n      }","sourceCodeStart":3106,"sourceCodeEnd":3142,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java#L3106-L3142","documentation":"Error \"{} is not the root of an encryption zone. Do you mean {}?\" thrown in apache/hadoop.","triggerScenarios":"An encryption-zone operation is attempted on a path that is inside an encryption zone but is not the zone root; the message suggests the actual root.","commonSituations":"See trigger scenarios.","solutions":["Use the encryption zone root path (the suggested path) for the operation.","Confirm the zone root via hdfs crypto -listZones."],"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"}