Skip to content

Extra bits returned by the Permissions struct on unix #45330

Closed
@pietroalbini

Description

@pietroalbini

Until September, PermissionsExt::mode on unix returned the permissions of the file masked with 0o777, which was hiding the set{u,g}id/sticky bits. Then, #44147 and #44624 changed the standard library to avoid masking the permissions at all.

The fix indeed exposed the missing bits, but it also exposed some extra ones, like the ones specifying if the node is a file or a directory. For example, now the permissions of a directory are like 0o40755.

I think those bits are out of place in the permissions, as the information is provided by the Metadata struct already. Can we revert to masking with 0o7777 to preserve the set{u,g}id/sticky but discard the extra ones?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions