noobaa-core
noobaa-core copied to clipboard
NSFS | NC | Update check access implementation to support flags
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.
- Currently we only checkAccess for read permissions, we want to allow checking permissions for write as well. There are a few options for that -
- 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)
- faccessat()/faccessat2() - which are not available on all file systems.
- 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
- Check access is being checked by the file system and not on our side.
Steps to reproduce
- manage_nsfs account add/update
- health script full run
More information - Screenshots / Logs / Other output
This issue had no activity for too long - it will now be labeled stale. Update it to prevent it from getting closed.
This issue is stale and had no activity for too long - it will now be closed.