patroni.file_perm module

Helper object that helps with figuring out file and directory permissions based on permissions of PGDATA.

var logger

logger of this module.

var pg_perm

instance of the \\__FilePermissions object.

_class _patroni.file_perm.\__FilePermissions View on GitHub

Bases: object + Helper class for managing permissions of directories and files under PGDATA. + Execute set_permissions_from_data_directory() to figure out which permissions should be used for files and directories under PGDATA based on permissions of PGDATA root directory. +

FilePermissions\__PG_DIR_MODE_GROUP = 488_

+

FilePermissions\__PG_DIR_MODE_OWNER = 448_

+

FilePermissions\__PG_FILE_MODE_GROUP = 416_

+

FilePermissions\__PG_FILE_MODE_OWNER = 384_

+

FilePermissions\__PG_MODE_MASK_GROUP = 23_

+

FilePermissions\__PG_MODE_MASK_OWNER = 63_

+

_FilePermissions\__set_group_permissions() → None View on GitHub

Make directories/files accessible by the owner and readable by group. +

_FilePermissions\__set_owner_permissions() → None View on GitHub

Make directories/files accessible only by the owner. +

_FilePermissions\__set_umask() → None View on GitHub

Set umask value based on calculations. + Note

  Should only be called once either `+\\__set_owner_permissions()+` or `+\\__set_group_permissions()+` has been executed.
+
__init\\__() → None View on GitHub

Create a \\__FilePermissions object and set default permissions. +

property _dir_create_mode: int_

Directory permissions. +

property _file_create_mode: int_

File permissions. +

set_permissions_from_data_directory(data_dir: str) → None View on GitHub

Set new permissions based on provided data_dir. +

Parameters

data_dir – reference to PGDATA to calculate permissions from.


© Copyright 2015 Compose, Zalando SE. Revision 3d527f57.

Built with Sphinx using a theme provided by Read the Docs.

Read the Docs v: master