Skip to content

HDDS-17951. Make the file permission reported by ofs and o3fs configurable - #12193

Open
aryangupta1998 wants to merge 1 commit into
apache:masterfrom
aryangupta1998:ofs-reported-file-permission
Open

aryangupta1998 wants to merge 1 commit into
apache:masterfrom
aryangupta1998:ofs-reported-file-permission

Conversation

@aryangupta1998

Copy link
Copy Markdown
Contributor

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:

PERMISSION_DENIED ... User yarn doesn't have READ permission to access key
Volume:user Bucket:alice Key:.sparkStaging/application_<id>/__spark_conf__.zip

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant