archivebox.config.permissions

Module Contents

Functions

drop_privileges

If running as root, drop privileges to the user that owns the data dir (or PUID)

SudoPermission

Attempt to run code with sudo permissions for a given user (or root)

Data

__package__

DATA_DIR

DEFAULT_PUID

DEFAULT_PGID

RUNNING_AS_UID

RUNNING_AS_GID

EUID

EGID

SUDO_UID

SUDO_GID

USER

IS_ROOT

IN_DOCKER

FALLBACK_UID

FALLBACK_GID

ARCHIVEBOX_USER

ARCHIVEBOX_GROUP

ARCHIVEBOX_USER_EXISTS

API

archivebox.config.permissions.__package__

‘archivebox.config’

archivebox.config.permissions.DATA_DIR

‘Path(…)’

archivebox.config.permissions.DEFAULT_PUID

911

archivebox.config.permissions.DEFAULT_PGID

911

archivebox.config.permissions.RUNNING_AS_UID

‘getuid(…)’

archivebox.config.permissions.RUNNING_AS_GID

‘getgid(…)’

archivebox.config.permissions.EUID

‘geteuid(…)’

archivebox.config.permissions.EGID

‘getegid(…)’

archivebox.config.permissions.SUDO_UID

‘int(…)’

archivebox.config.permissions.SUDO_GID

‘int(…)’

archivebox.config.permissions.USER: str

None

archivebox.config.permissions.IS_ROOT

None

archivebox.config.permissions.IN_DOCKER

None

archivebox.config.permissions.FALLBACK_UID

None

archivebox.config.permissions.FALLBACK_GID

None

archivebox.config.permissions.ARCHIVEBOX_USER

‘int(…)’

archivebox.config.permissions.ARCHIVEBOX_GROUP

‘int(…)’

archivebox.config.permissions.ARCHIVEBOX_USER_EXISTS

False

archivebox.config.permissions.drop_privileges()

If running as root, drop privileges to the user that owns the data dir (or PUID)

archivebox.config.permissions.SudoPermission(uid=0, fallback=False)

Attempt to run code with sudo permissions for a given user (or root)