archivebox.config.permissions
Module Contents
Functions
Return bounded top-level paths safe to hand from root to archivebox. |
|
Allow bounded handoff only for root or archivebox-owned collection roots. |
|
Return whether adding archivebox traversal preserves existing parent access. |
|
Let the archivebox account traverse private root-owned parents. |
|
If running as root, drop privileges to the data dir owner or archivebox user. |
|
Attempt to run code with sudo permissions for a given user (or root) |
Data
API
- archivebox.config.permissions.select_archivebox_user(*, running_uid: int, running_gid: int, effective_uid: int, effective_gid: int, sudo_uid: int, sudo_gid: int, data_dir_uid: int, data_dir_gid: int, account_uid: int | None, account_gid: int | None, data_dir_owner_gid: int | None = None, data_dir_owner_exists: bool = True) tuple[int, int][source]
- archivebox.config.permissions.ROOT_HANDOFF_NAMES[source]
(‘.archivebox_id’, ‘ArchiveBox.conf’, ‘index.sqlite3’, ‘index.sqlite3-shm’, ‘index.sqlite3-wal’, ‘ar…
- archivebox.config.permissions.root_data_dir_handoff_paths(data_dir: pathlib.Path, argv: list[str]) tuple[pathlib.Path, ...][source]
Return bounded top-level paths safe to hand from root to archivebox.
- archivebox.config.permissions.root_should_handoff_data_dir(*, is_root: bool, data_dir_uid: int, account_uid: int | None, data_dir_owner_exists: bool = True) bool[source]
Allow bounded handoff only for root or archivebox-owned collection roots.
- archivebox.config.permissions.root_parent_can_grant_group_traversal(*, parent_uid: int, parent_gid: int, parent_mode: int, account_gid: int) bool[source]
Return whether adding archivebox traversal preserves existing parent access.
- archivebox.config.permissions.grant_archivebox_group_traversal(path: pathlib.Path) None[source]
Let the archivebox account traverse private root-owned parents.