Skip to content
This repository was archived by the owner on Nov 21, 2026. It is now read-only.
This repository was archived by the owner on Nov 21, 2026. It is now read-only.

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

Open

Description

@jeanlaganiere

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.

Activity

  1. tenortim commented on Mar 22, 2022

    @tenortim

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions