ID EN
OS

chown

Python 3.11

Change the owner and group id of path to the numeric uid and gid. To leave one of the ids unchanged, set it to -1.

Syntax

PYTHON
os.chown(path, uid, gid, *, dir_fd=None, follow_symlinks=True)

See Also

specifying a file descriptor paths relative to directory descriptors not following symlinks shutil.chown() auditing event Availability WebAssembly platforms path-like object