Package to manage access control using POSIX ACLs
Project description
PyFACL
A Python library for parsing and checking POSIX File Access Control Lists (FACL).
Installation
From PyPI
pip install pyfacl
Usage
from pyfacl import FACL
# Initialize and parse FACL for a file/directory
facl = FACL()
facl.parse("/path/to/file")
# Check permissions with different modes
facl.has_permission("user:username:r-x", mode="exact") # exact match
facl.has_permission("user:username:r--", mode="at_least") # has at least read
facl.has_permission("user:username:rwx", mode="at_most") # has at most rwx
Permission Modes
exact: Permissions must match exactlyat_least: Must have at least the specified permissionsat_most: Must have at most the specified permissions
Development
Setup Development Environment
pip install -e ".[dev]"
pre-commit install
Run Pre-commit Checks
pre-commit run --all-files
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyfacl-1.0.0.tar.gz
(4.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyfacl-1.0.0.tar.gz.
File metadata
- Download URL: pyfacl-1.0.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.9 Linux/4.18.0-425.19.2.el8_7.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b313443e7591ea22670aa6eaf1af1bb6a2515f620ef8729bb9b972edd930eacb
|
|
| MD5 |
328527273d5c0b1ec9f7c177b16bb4e3
|
|
| BLAKE2b-256 |
eff8be63cf720fb36f7037095e9a6c979516bba95994a45769597e7f11336bd1
|
File details
Details for the file pyfacl-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pyfacl-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.9 Linux/4.18.0-425.19.2.el8_7.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfea72de9f634dc1b6b976c1a9be94129fb35b015fb8d4de8604c8131220e675
|
|
| MD5 |
b0c31f9a910d7344d86ee2433ab8db6e
|
|
| BLAKE2b-256 |
775af5ffe6f404d421181a214e4938a4bd75dcbd4744be6b92f6e71e3dea811d
|