On this page
  1. posix.fchmod
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

posix.fchmod

Prev: posix.fchdir | Up: posix | Next: posix.fchown
Rel: posix.abort, posix.access, posix.chdir, posix.chflags
Ref: docs.python.org — posix.fchmod
Tags: #public #python3 #stdlib #posix


Import

import posix
from posix import fchmod

Signature & Overview

posix.fchmod(fd, mode)

Change the access permissions of the file given by file descriptor fd.

Usage

import os, tempfile

with tempfile.TemporaryFile() as f:
    os.fchmod(f.fileno(), 0o600)

Gotchas

REPL Inspect

from posix import fchmod
help(fchmod)

Linked from

Related notes