int fchown(int dir_fd, char *path, int len, uint32_t user, uint32_t group, int flags);
This syscall sets the owner’s UID and GID for the passed arguments in the same way fstat fetches information for the passed arguments.
The syscall returns 0 on success or -1 on failure, with the
following errno:
EINVALThe passed FD or the user and group were not valid.
EACCESMAC did not allow this.
EBADFThe passed file is valid but it was not a physical file in a filesystem.