Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSFS | macos | buckets created with parent directory GID instead of thread (user) GID #8665

Open
nadavMiz opened this issue Jan 8, 2025 · 0 comments
Labels

Comments

@nadavMiz
Copy link
Contributor

nadavMiz commented Jan 8, 2025

Environment info

  • NooBaa Version: VERSION
  • Platform: Kubernetes 1.14.1 | minikube 1.1.1 | OpenShift 4.1 | other: specify

on macos when creating new directories using mkdir it assigns the directory GID and not the process GID. this is especially problematic when creating new buckets and objects on s3 operations on nsfs, as the objects/buckets will not get the user GID. in turn this will cause the file to have unexpected permissions (user with specific GID might not be able to access the files).

Actual behavior

  1. s3 put-object, create-bucket creates bucket with parent directory gid instead of users gid

Expected behavior

  1. buckets and objects are created with the users GID, user with group permissions can access and modify the files

Steps to reproduce

  1. create new user with specific non root uid and gid (for example uid 2000, gid 2000)
  2. create new bucket using s3 operation s3api create-bucket --bucket "test-bucket"
  3. check bucket ownership -run ls -la <path-toi-bucket>
  4. gid is of parent directory and not users (2000 in this example)
drwxrwxrwx. 6 nadav wheel  77 Jan  7 14:11 .
drwxrwx---. 4   2000   wheel  85 Jan  5 06:48 test-bucket

More information - Screenshots / Logs / Other output

POSIX documentation of mkdir:

Implementations shall provide a way to initialize the directory's group ID to the group ID of the parent directory.
Implementations may, but need not, provide an implementation-defined way to initialize the directory's group ID to the effective group ID of the calling process

macos documentation of mkdir :

The directory's owner ID is set to the process's effective user ID.  The
directory's group ID is set to that of the parent directory in which it is created.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant