Skip to content

Group inheritance (SGID bit) does not work in -allow_other mode #338

@slackner

Description

@slackner

The issue noticed in fcaca5f#r31889375 reveals a much larger problem.

Two things are important to make group inheritance work correctly:

  • The group of any new file, directory, ... should be set correctly
  • For directories, the SGID bit should be preserved

The first point never worked due to the explicit Fchown* we execute when PreserveOwner is enabled. The second point sometimes worked, but this was more pure luck than intentional. For directories created without write/execute permission it never worked due to the explicit Fchmod we executed in that case.

Even with PreserveOwner disabled, group inheritance did not always work (e.g., in the case where we execute an explicit Fchmod on a newly created directory).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions