Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-4685 Implementation of ACLs in HDFS
  3. HDFS-5613

NameNode: implement handling of ACLs in combination with symlinks.

    Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: HDFS ACLs (HDFS-4685)
    • Fix Version/s: HDFS ACLs (HDFS-4685)
    • Component/s: namenode
    • Labels:
      None

      Description

      A symlink in HDFS does not have an ACL of its own. Operations that modify the ACL of a symlink instead modify the target of the symlink. For operations that enforce ACLs, enforcement is on the target of the symlink. This is similar to existing handling of permissions for symlinks.

      1. HDFS-5613.1.patch
        10 kB
        Chris Nauroth

        Issue Links

          Activity

          Hide
          Chris Nauroth added a comment -

          I expect that no actual code changes are required to support ACLs in combination with symlinks. FSPermissionChecker already knows how to follow the symlink when necessary before doing the permission check, and the patch in HDFS-5612 will enforce permissions for ACLs, so I expect the two will work together. I'm still going to leave this issue open so that we can add tests to TestPermissionSymlinks to cover it.

          Show
          Chris Nauroth added a comment - I expect that no actual code changes are required to support ACLs in combination with symlinks. FSPermissionChecker already knows how to follow the symlink when necessary before doing the permission check, and the patch in HDFS-5612 will enforce permissions for ACLs, so I expect the two will work together. I'm still going to leave this issue open so that we can add tests to TestPermissionSymlinks to cover it.
          Hide
          Chris Nauroth added a comment -

          This patch updates TestPermissionSymlinks. This class already contained tests covering various settings for permission bits and how they interact with symlinks. I made a duplicate of each test to cover the same thing using an ACL instead of permission bits. I refactored so that the two variants of each test (permission bits and ACLs) share a lot of common logic.

          As I expected, everything worked fine with ACLs in the current code. These tests passed without any need to make further changes in the product code.

          Show
          Chris Nauroth added a comment - This patch updates TestPermissionSymlinks . This class already contained tests covering various settings for permission bits and how they interact with symlinks. I made a duplicate of each test to cover the same thing using an ACL instead of permission bits. I refactored so that the two variants of each test (permission bits and ACLs) share a lot of common logic. As I expected, everything worked fine with ACLs in the current code. These tests passed without any need to make further changes in the product code.
          Hide
          Haohui Mai added a comment -

          +1. The patch looks good. I'll commit it shortly.

          Show
          Haohui Mai added a comment - +1. The patch looks good. I'll commit it shortly.
          Hide
          Haohui Mai added a comment -

          I've committed it into the branch. Thanks Chris for the contribution.

          Show
          Haohui Mai added a comment - I've committed it into the branch. Thanks Chris for the contribution.

            People

            • Assignee:
              Chris Nauroth
              Reporter:
              Chris Nauroth
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development