versitygw icon indicating copy to clipboard operation
versitygw copied to clipboard

[Bug] - versitygw admin cannot list buckets or set ownership on directories that were created using mkdir

Open nathanschumann opened this issue 6 months ago • 0 comments

Describe the bug

versitygw admin list-buckets and versitygw admin change-bucket-owner fails for the ScoutFS backend when there are normal directories without the user.acl and user.ownership attributes set.

# ls -l
total 0
drwxr-xr-x 2 root root 0 Aug 12 13:37 bucket
drwxr-xr-x 2 root root 0 Aug 12 13:40 posix_bucket

The bucket was made with a mb command using s3cmd. The posix_bucket was created with mkdir posix_bucket.

# getfattr --dump bucket
# file: bucket
user.acl="{\"Owner\":\"root_access\",\"Grantees\":[{\"Permission\":\"FULL_CONTROL\",\"Access\":\"root_access\",\"Type\":\"CanonicalUser\"}]}"
user.ownership="BucketOwnerEnforced"

No attributes are set on posix_bucket

To Reproduce

  1. Create a directory in the $VGW_BACKEND_ARG using mkdir test_dir
  2. Run versitygw admin list-buckets
  3. Observe failure

Expected behavior

The expected behavior is that the list-buckets operation should not fail.

Server Version

Version  : 1.0.5
Build    : adbc8140ed85e6b5b240600b49fcd60fe2282307
BuildTime: 2024-08-06T17:50:34Z
Linux s81.local 4.18.0-553.5.1.el8_10.x86_64 #1 SMP Wed Jun 5 09:12:13 EDT 2024 x86_64 x86_64 x86_64 GNU/Linux

Additional context

nathanschumann avatar Aug 12 '24 13:08 nathanschumann