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

eosfs: inherit acl attrs for files from parent directory #1882

Closed
ishank011 opened this issue Jul 12, 2021 · 4 comments · Fixed by #2174
Closed

eosfs: inherit acl attrs for files from parent directory #1882

ishank011 opened this issue Jul 12, 2021 · 4 comments · Fixed by #2174
Assignees
Labels

Comments

@ishank011
Copy link
Contributor

When running eos file info for a file, we do not get the ACL sys attributes which are followed by its parent, and these are expected to be set to determine the proper permissions for files for specific users. Hence, we need to add logic to inherit these for files from their parent directories.

@ffurano
Copy link
Contributor

ffurano commented Jul 12, 2021

Are you referring to just displaying in reva these file acls merged with the acls of the base path or what
else am I missing?

Just displaying these attributes OR-ed in reva is doable, although pretty dirty AFAIU. I would prefer to solve this on the eos side, that would make reva coherent with the output of "eos file info", avoiding future confusion in future admins

Please let me know if I understood well what you mean

@ishank011
Copy link
Contributor Author

Yes, having it in EOS would be the most ideal but at the moment it's not present, and this is needed by the UI to display the appropriate permissions. For example, when opening a file in any of the office applications, we need to determine based on the permissions passed by EOS whether we want to open it in view or edit mode.

Here's an example:

$ eos file info /eos/user/i/iarora/sharing-test -m
keylength.file=31 file=/eos/user/i/iarora/sharing-test ... xattrn=sys.acl xattrv=u:103421:rxm!dq,egroup:cernbox-admins:rxm!dq ...

$ eos file info /eos/user/i/iarora/sharing-test/abc.txt -m
keylength.file=68 file=/eos/user/i/iarora/sharing-test/abc.txt ... // acl xattrn not present

@ffurano
Copy link
Contributor

ffurano commented Jul 13, 2021

I see what you mean

Are we sure that the acl is applied to abc.txt even if it's not displayed in the text output?

Shall we merge the output with just the acls of the base path or shall we get the acls of all the parent directories?

@ishank011 ishank011 added the junior-job Easy issues label Jul 15, 2021
@ishank011
Copy link
Contributor Author

ishank011 commented Jul 15, 2021

Yep, files don't list system attributes but they still obey them. We support file sharing by setting user attributes but we also need these for files present inside shared folders for multiple use cases.
We just need to check the immediate parent directory because that will inherit the ACLs from its parents.

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

Successfully merging a pull request may close this issue.

2 participants