nix::sys::stat
pub fn fchmod(fd: RawFd, mode: Mode) -> Result<()>
Change the file permission bits of the file specified by a file descriptor.
fchmod(2).