9.55 fchmod

int fchmod(int dir_fd, char *path, int len, mode_t mode, int flags);

This syscall sets the mode 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:

EINVAL

The passed FD or mode is not valid.

EACCES

MAC did not allow this.