Christos Bisias created HDDS-9950:
-------------------------------------

             Summary: 'ozone fs -ls' on volume shows the volume owner as the 
bucket owner
                 Key: HDDS-9950
                 URL: https://issues.apache.org/jira/browse/HDDS-9950
             Project: Apache Ozone
          Issue Type: Bug
            Reporter: Christos Bisias
            Assignee: Christos Bisias


`ozone fs -ls` on a volume uri, sets the volume owner as the owner for every 
bucket. 

This can be easily reproduced in the docker dev env.
 * Connect to a container as user `hadoop` create volume `/vol1`
 * Connect to a container as user `testuser` and create a bucket under `/vol1`
 * Connect to a container as user `testuser2` and create another bucket under 
`/vol1`
 * Run `ozone fs -ls /vol1`
 * Update the volume owner
 * Run `ozone fs -ls /vol1` again, it will display the new volume owner

{code:java}
> docker-compose exec om ozone sh volume create /vol1
> docker-compose exec -u testuser om ozone sh bucket create /vol1/bucket1
> docker-compose exec -u testuser2 om ozone sh bucket create /vol1/bucket2

> docker-compose exec -u testuser om ozone fs -ls /vol1                   
Found 2 items
drwxrwxrwx   - hadoop hadoop          0 2023-12-18 14:17 /vol1/bucket1
drwxrwxrwx   - hadoop hadoop          0 2023-12-18 14:17 /vol1/bucket2

> docker-compose exec om ozone sh volume update --user testuser /vol1
{
  "metadata" : { },
  "name" : "vol1",
  "admin" : "hadoop",
  "owner" : "testuser",
  "quotaInBytes" : -1,
  "quotaInNamespace" : -1,
  "usedNamespace" : 2,
  "creationTime" : "2023-12-18T14:16:37.048Z",
  "modificationTime" : "2023-12-18T14:18:11.263Z",
  "acls" : [ {
    "type" : "USER",
    "name" : "hadoop",
    "aclScope" : "ACCESS",
    "aclList" : [ "ALL" ]
  }, {
    "type" : "GROUP",
    "name" : "hadoop",
    "aclScope" : "ACCESS",
    "aclList" : [ "ALL" ]
  } ],
  "refCount" : 0
}

> docker-compose exec -u testuser om ozone fs -ls /vol1
Found 2 items
drwxrwxrwx   - testuser testuser          0 2023-12-18 14:17 /vol1/bucket1
drwxrwxrwx   - testuser testuser          0 2023-12-18 14:17 /vol1/bucket2 
{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to