Skip to content

clarify documentation on when os.lchmod() is missing #107959

Closed
@calestyo

Description

@calestyo

Documentation

lchmod() is not part of POSIX, see
https://pubs.opengroup.org/onlinepubs/9699919799/functions/chmod.html but only mentioned there for systems which support changing the file permission bits of symbolic links:

Some implementations might allow changing the mode of symbolic links. This is not supported by the interfaces in the POSIX specification. Systems with such support provide an interface named lchmod(). To support such implementations fchmodat() has a flag parameter.

Therefore, lchmod() isn't available on any Unixes, which don't do so.
According to https://unix.stackexchange.com/questions/224979/why-do-linux-posix-have-lchown-but-not-lchmod this might be a majority.
In any case, Linux, which nowadays is undoubtedly the most important POSIX/Unix-like system, doesn't do so.

I shall provide a MR, which adds some clarification to the documentation about this.

Cheers,
Chris.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions