Repository navigation
HDDS-17951. Make the file permission reported by ofs and o3fs configurable - #12193
Open
aryangupta1998 wants to merge 1 commit into
Open
aryangupta1998 wants to merge 1 commit into
aryangupta1998 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Problem
ofs and o3fs always report files as 666 (readable by everyone), even when ACLs allow only the owner to read them.
Some applications trust this value. For example, Spark and MapReduce on YARN check whether a job's staging files are readable by everyone. If they are, the files are treated as public, and the NodeManager downloads them as its own user instead of the job's user. With ACLs enabled, the NodeManager user has no access to the job owner's files, so the download fails and the job fails before it starts:
Giving the NodeManager user read access to all users' files works around this, but it exposes private job files through the NodeManager's shared public cache.
Proposed change
Add a client setting, ozone.fs.file.permission.reported (default 666, so nothing changes unless it is set). With ACLs enabled, setting it to 600 makes files appear owner-only, so YARN downloads them as the job's user and the job works. Directories are still reported as 777.
This only changes the reported value. Access is still controlled by ACLs.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-17951
How was this patch tested?
Unit and Integration Tests.