{"record":{"id":"ac1c9a14f47e36e0","repo":"apache/hadoop","slug":"path-contains-a-symlink-and-symlink-resolution","errorCode":null,"errorMessage":"Path {} contains a symlink and symlink resolution is disabled ({}).","messagePattern":"Path (.+?) contains a symlink and symlink resolution is disabled \\((.+?)\\)\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystemLinkResolver.java","lineNumber":85,"sourceCode":"   * @param path Path with which to try call\n   * @return Generic type determined by implementation\n   * @throws IOException raised on errors performing I/O.\n   */\n  public T resolve(final FileSystem filesys, final Path path)\n      throws IOException {\n    int count = 0;\n    T in = null;\n    Path p = path;\n    // Assumes path belongs to this FileSystem.\n    // Callers validate this by passing paths through FileSystem#checkPath\n    FileSystem fs = filesys;\n    for (boolean isLink = true; isLink;) {\n      try {\n        in = doCall(p);\n        isLink = false;\n      } catch (UnresolvedLinkException e) {\n        if (!filesys.resolveSymlinks) {\n          throw new IOException(\"Path \" + path + \" contains a symlink\"\n              + \" and symlink resolution is disabled (\"\n              + CommonConfigurationKeys.FS_CLIENT_RESOLVE_REMOTE_SYMLINKS_KEY\n              + \").\", e);\n        }\n        if (!FileSystem.areSymlinksEnabled()) {\n          throw new IOException(\"Symlink resolution is disabled in\" +\n              \" this version of Hadoop.\");\n        }\n        if (count++ > FsConstants.MAX_PATH_LINKS) {\n          throw new IOException(\"Possible cyclic loop while \" +\n                                \"following symbolic link \" + path);\n        }\n        // Resolve the first unresolved path component\n        p = FSLinkResolver.qualifySymlinkTarget(fs.getUri(), p,\n            filesys.resolveLink(p));\n        fs = FileSystem.getFSofPath(p, filesys.getConf());\n        // Have to call next if it's a new FS\n        if (!fs.equals(filesys)) {","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystemLinkResolver.java#L67-L103","documentation":"Error \"Path {} contains a symlink and symlink resolution is disabled ({}).\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystemLinkResolver.java:85 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable symlink resolution by setting fs.permissions... no — set the Hadoop version/config that supports symlinks, or avoid symlinks in the path.","Resolve the symlink manually and use the target path."],"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-23T01:17:44.959Z"}