10.69.6 chown
¶
POSIX specification:
https://pubs.opengroup.org/onlinepubs/9799919799/functions/chown.html
Gnulib module: chown
Portability problems fixed by Gnulib:
- Some platforms fail to detect trailing slash on non-directories, as in
chown("link-to-file/",uid,gid)
:
macOS 14, FreeBSD 7.2, AIX 7.3.1, Solaris 9.
- Some platforms fail to update the change time when at least one
argument was not −1, but no ownership changes resulted:
OpenBSD 7.2.
- When passed an argument of −1, some implementations really set the owner
user/group id of the file to this value, rather than leaving that id of the
file alone:
some very old platforms.
- When applied to a symbolic link, some implementations don’t dereference
the symlink, i.e. they behave like
lchown
:
some very old platforms.
- This function is missing on some platforms; however, the replacement
always fails with
ENOSYS
:
mingw, MSVC 14.
Portability problems not fixed by Gnulib:
- This function sometimes fails with
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).