Isilon / isilon_sdk_python

Official generated source of the Isilon SDK Python language bindings.
35 stars 34 forks source link

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

Open jeanlaganiere opened 2 years ago

jeanlaganiere commented 2 years ago

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 commented 2 years ago

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?