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

SetAllowNonOwnerAccess does not work and is a no-op #8109

Open
mrambacher opened this issue Mar 25, 2021 · 0 comments
Open

SetAllowNonOwnerAccess does not work and is a no-op #8109

mrambacher opened this issue Mar 25, 2021 · 0 comments

Comments

@mrambacher
Copy link
Contributor

This was found during code inspection.

There is a method Env::SetAllowNonOwnerAccess that is meant to change the umask settings for files that are opened. By default this method returns NotSupported.

With the introduction of the FileSystem class, there was an additional "SetAllowNonOwnerAccess" method added to the PosixFileSystem (but not the FileSystem class). There is no wiring between the Env and the FileSystem to update the value for owner access, so the value in PosixFileSystem cannot currently be changed (always true).

When it worked, the umask will be 644 or 600 depending on the whether allow non owner access was true or false.

The only test for this feature (in env_test) is disabled, hence no one noticing the issue.

There are several potential solutions to this problem:

  1. Eliminate the feature altogether (deprecate/remove the API)
  2. Add the corresponding API to the FileSystem class and wire it up accordingly.
  3. Once the FileSystem class is Configurable/Customizable, allow this property to be set through configuration settings.

I will leave it to others to decide if the feature should be deprecated or configurable. Personally, I would prefer #1 or #3 to the adding a new API to the FileSystem class (#2) to support a use case that is likely very specific to one FileSystem implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant