fchmodat ¶POSIX specification:
https://pubs.opengroup.org/onlinepubs/9799919799/functions/fchmodat.html
Portability problems fixed by Gnulib:
AT_SYMLINK_NOFOLLOW flag,
this function fails with errno set to ENOTSUP,
even when the file is not a symbolic link:
GNU/Linux with glibc 2.31, Cygwin 2.9.
Portability problems not fixed by Gnulib:
AT_SYMLINK_NOFOLLOW flag is specified,
this function can fail with errno set to EMFILE or ENFILE,
and it fails with errno set to EOPNOTSUPP if the
/proc file system is not mounted:
GNU/Linux with glibc 2.34.
EACCES when the failure is
due to lack of appropriate privileges (EPERM), not to
search permission denied on the file name prefix (EACCES):
Linux kernel 5.15 with glibc 2.35 and a CIFS v1 file system
(see https://bugs.gnu.org/65599).