apache/hadoop · error · AccessControlException

Permission denied by sticky bit: user=%s, path="%s":%s:%s:%s

Error message

Permission denied by sticky bit: user=%s, path="%s":%s:%s:%s%s, parent="%s":%s:%s:%s%s

What it means

Error "Permission denied by sticky bit: user=%s, path="%s":%s:%s:%s%s, parent="%s":%s:%s:%s%s" thrown in apache/hadoop.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSPermissionChecker.java:808

                                      INodeAttributes inode) {
    // If this user is the directory owner, return
    if (parent.getUserName().equals(getUser())) {
      return false;
    }

    // if this user is the file owner, return
    if (inode.getUserName().equals(getUser())) {
      return false;
    }

    return true;
  }

  private void throwStickyBitException(
      String inodePath, INodeAttributes inode,
      String parentPath, INodeAttributes parent)
      throws AccessControlException {
    throw new AccessControlException(String.format(
        FSExceptionMessages.PERMISSION_DENIED_BY_STICKY_BIT +
            ": user=%s, path=\"%s\":%s:%s:%s%s, " +
            "parent=\"%s\":%s:%s:%s%s", user, inodePath, inode.getUserName(),
        inode.getGroupName(), inode.isDirectory() ? "d" : "-",
        inode.getFsPermission().toString(), parentPath, parent.getUserName(),
        parent.getGroupName(), parent.isDirectory() ? "d" : "-",
        parent.getFsPermission().toString()));
  }

  /**
   * Whether a cache pool can be accessed by the current context
   *
   * @param pool CachePool being accessed
   * @param access type of action being performed on the cache pool
   * @throws AccessControlException if pool cannot be accessed
   */
  public void checkPermission(CachePool pool, FsAction access)
      throws AccessControlException {

View on GitHub (pinned to 2add963021)

Solutions

  1. Only the file owner, directory owner, or superuser may delete/rename entries in a sticky-bit directory (e.g., /tmp); use the owning user.

When it happens

Trigger: A user deletes or renames a file inside a sticky-bit directory without owning the file or the directory.

Common situations: Deleting another user's files in a world-writable sticky directory such as /tmp on HDFS.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/35c950852ea86e17. Report an issue: GitHub.