Description
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.