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 | NC | Update check access implementation to support flags #7794

Open
romayalon opened this issue Feb 5, 2024 · 1 comment
Open

NSFS | NC | Update check access implementation to support flags #7794

romayalon opened this issue Feb 5, 2024 · 1 comment
Assignees
Labels

Comments

@romayalon
Copy link
Contributor

romayalon commented Feb 5, 2024

Environment info

  • NooBaa Version: Master
  • Platform: NC

Actual behavior

The Health script and manage_nsfs account add/update requires us to check if an account has rw access to its new_buckets_path. Currently, we do that by is_dir_rw_accessible() function that stat() the folder and checks its permissions.
This access check won't cover supplemental groups and ACLs.

  1. Currently we only checkAccess for read permissions, we want to allow checking permissions for write as well.
    There are a few options for that -
  2. access() - checking access of the real uid/gid and not the effective uid/gid (so we need to replace the real uid/gid pair as well)
  3. faccessat()/faccessat2() - which are not available on all file systems.
  4. Open a file under the directory using O_CREATE, unlink the file, and close it so the file won't get written to the disk.

Expected behavior

  1. Check access is being checked by the file system and not on our side.

Steps to reproduce

  1. manage_nsfs account add/update
  2. health script full run

More information - Screenshots / Logs / Other output

@romayalon romayalon added the NS-FS label Feb 5, 2024
@romayalon romayalon self-assigned this Feb 5, 2024
@romayalon romayalon added the Non Containerized Non containerized label Feb 5, 2024
Copy link

github-actions bot commented May 6, 2024

This issue had no activity for too long - it will now be labeled stale. Update it to prevent it from getting closed.

@github-actions github-actions bot added the Stale label May 6, 2024
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