z-bb opened a new pull request, #4674:
URL: https://github.com/apache/ozone/pull/4674

   ## What changes were proposed in this pull request?
   ```
   ozone cli
   
   [hadoop@presto-test-006 ~]$ om-current/bin/ozone sh vol addacl -a 
user:test:r vol-1-29165
   ACL user:test:r[ACCESS] added successfully.
   [hadoop@presto-test-006 ~]$ om-current/bin/ozone sh  bucket addacl -a 
user:test:r vol-1-29165/bucket-188-54163
   ACL user:test:r[ACCESS] added successfully.
   [hadoop@presto-test-006 ~]$ export HADOOP_USER_NAME=test
   [hadoop@presto-test-006 ~]$ om-current/bin/ozone sh key list --prefix=h 
vol-1-29165/bucket-188-54163/
   PERMISSION_DENIED User test doesn't have LIST permission to access bucket 
Volume:vol-1-29165 Bucket:bucket-188-54163 Key:h
   
   [hadoop@presto-test-006 ~]$ om-current/bin/ozone sh bucket list --prefix=b 
vol-1-29165/
   PERMISSION_DENIED User test doesn't have LIST permission to access volume 
Volume:vol-1-29165
   ```
   
   ```
   [[email protected] ~/hadoop-2.7.2-5504-ozone-client]$ export 
HADOOP_USER_NAME=test
   [[email protected] ~/hadoop-2.7.2-5504-ozone-client]$ 
./bin/hadoop fs -ls /vol-1-29165/bucket-188-54163/h*
   -rw-rw-rw-   3 test test        243 2023-05-08 14:13 
/vol-1-29165/bucket-188-54163/hosts
   ```
   
   ```
   hadoop cli
   
   listKeys(){
        if (isAclEnabled) {
           checkAcls(ResourceType.BUCKET, StoreType.OZONE, ACLType.LIST,
               bucket.realVolume(), bucket.realBucket(), keyPrefix);
         }
   }
   
   
   listStatus() {
        if (isAclEnabled) {
           checkAcls(getResourceType(args), StoreType.OZONE, ACLType.READ,
               bucket.realVolume(), bucket.realBucket(), args.getKeyName());
         }
   }
   ```
   
   In the listKeys method,ACLType is LIST, but in the listStatus method, 
ACLType is READ
   So it causes inconsistent return information. 
   I think listStatus should also check LIST.
   
   https://issues.apache.org/jira/browse/HDDS-8566
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to