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.1.0.tar.gz
(6.3 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.1.0.tar.gz.
File metadata
- Download URL: pyfacl-1.1.0.tar.gz
- Upload date:
- Size: 6.3 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 |
f8b572e9222ca595edef640cac0a6af26f13b861fb8296cfc4d3b5f479c12f53
|
|
| MD5 |
3294d079162ca6232a42046e5833f6a5
|
|
| BLAKE2b-256 |
60816d25477b81f6b4975edccdcb34dbfa4732d1e8863b35c2de723608d6421e
|
File details
Details for the file pyfacl-1.1.0-py3-none-any.whl.
File metadata
- Download URL: pyfacl-1.1.0-py3-none-any.whl
- Upload date:
- Size: 8.1 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 |
87d0876b86499deb3ac2a402ad55e3a2af1e57dfc85e92bf6e7b797784797bcc
|
|
| MD5 |
5473fd4722a8f75d113dc4ac86588069
|
|
| BLAKE2b-256 |
508a2b66d406914f0375d8f8571be949407dcc353e04ffe0a01a6a99473a2d71
|