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

Setting owner and group to folder does not seems to works #51

Open
jeanlaganiere opened this issue Mar 21, 2022 · 1 comment
Open

Setting owner and group to folder does not seems to works #51

jeanlaganiere opened this issue Mar 21, 2022 · 1 comment

Comments

@jeanlaganiere
Copy link

Just trying to create a folder with permission other than root:wheel does not seems to work with this method:

np_api_response = names_api_instance.create_directory(overwrite=False, directory_path=myPath, x_isi_ifs_target_type="container", x_isi_ifs_access_control=myPermissions)

ns_acl = NamespaceAcl(authoritative='mode', action='replace', group=myGroup, owner=myOwner, mode=myPermissions)

np_api_response = names_api_instance.set_acl(namespace_path=myPath, acl=True, namespace_acl=ns_acl)

Any ideas what's wrong here?

Thanks in advanced.

@tenortim
Copy link

Hello @jeanlaganiere,
I don't believe that this is an API issue, unless you are already running as root.
Neither POSIX nor Windows allows changing ownership of a file.
On POSIX systems, only root can set the owner of a file. You can change the group of a file only to a group of which you are a member.
On Windows, the "set owner" right is not well-named. If an ACE in an ACL grants that right, it allows the caller to take ownership of the file, not give it away to somebody else.

You can do this as a non-root user on OneFS if you grant the user the backup or restore privilege (create a role with the necessary privileges and add the user to that role).

Does that explain what you are seeing, or could you give more detail?

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

2 participants