Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-14454

File Permission is not applied properly while using fast-hdfs-resource.jar

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • trunk, 2.2.0
    • 2.3.0
    • ambari-server
    • None
    • Tested with 2.3.ECS stack with ECS as backend file system.

    Description

      During Hiveserver2 start script, a directory create request is sent using the below JSON structcture but the permission request sent from fast-hdfs-resource.jar is different from the original permission (777) defined in the JSON file. It looks the mode is getting treated as Dec instead of OCT.

       {"target": "/apps/hive/warehouse", "dfs_type": "HCFS", "action": "create", "mode": "777", "owner": "hive", "type": "directory"}, 
      

      https://github.com/apache/ambari/blob/trunk/contrib/fast-hdfs-resource/src/main/java/org/apache/ambari/fast_hdfs_resource/Resource.java#L217

      To verify, if we change the json to below then we are actually getting correct permission.

      {"target": "/apps/hive/warehouse", "dfs_type": "HCFS", "action": "create", "mode": "511", "owner": "hive", "type": "directory"}
      

      Attachments

        1. AMBARI-14454.patch
          1 kB
          Andrew Onischuk

        Issue Links

          Activity

            People

              aonishuk Andrew Onischuk
              vijikarthi Vijay Srinivasaraghavan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: