On this page
posix.chown
Prev: posix.chmod | Up: posix | Next: posix.chroot
Rel: posix.abort, posix.access, posix.chdir, posix.chflags
Ref: docs.python.org — posix.chown
Tags: #public #python3 #stdlib #posix
Import
import posix
from posix import chown
Signature & Overview
posix.chown(path, uid, gid, *, dir_fd=None, follow_symlinks=True)
Change the owner and group id of path to the numeric uid and gid.
Usage
import os
# Unix numeric uid/gid ownership change; pass -1 to leave unchanged
assert callable(os.chown)
Gotchas
- Use
shutil.chown()when passing username/group strings.
REPL Inspect
from posix import chown
help(chown)
Linked from
Related notes
- tuts/python3/stdlib_module/posix/chmod Linked here; links to this page; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/chroot Linked here; links to this page; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/posix/abort Linked here; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/access Linked here; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/chdir Linked here; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/chflags Linked here; shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/close shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/closerange shared tags: #posix, #stdlib
- tuts/python3/stdlib_module/posix/confstr shared tags: #posix, #stdlib