Code to handle symbolic permissions like GNU chmod does ('a=rx,u+w')
Project description
SymbolicMode -- Code to handle symbolic file permissions
This python library parses symbolic file permission modes as used by GNU chmod, part of the coreutils package. For example:
>>> from symbolicmode import *
>>> oct(symbolic_to_numeric_permissions('a=rx,u+w'))
'0o755'
Status
This library is fully compatible with GNU Coreutils 8.32-4.1ubuntu1, the version on my system which I have extensively tested using fuzz testing, with the following exceptions:
- It does not yet implement the "umask" based permissions setting (when no user portion is specified on the left hand side of the operator, for example "=rx").
- It does not yet implement the "ugo" permissions (when a "ugo" appears on the right hand side of the operator, for example "go=u").
Fuzz Testing
In the "fuzzchmod" directory is a set of programs for fuzz testing SymbolicMode against the system "chmod" to try to ensure correctness for even unusual inputs.
License
CC0 1.0 Universal, see LICENSE file for more information.
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
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 symbolicmode-0.3.tar.gz.
File metadata
- Download URL: symbolicmode-0.3.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc5e952c3669bd536c928c0e36d4445051809a32da4d6fdfd65363116f6564ad
|
|
| MD5 |
4333547c1b4b77e0299fa3b4702b2171
|
|
| BLAKE2b-256 |
5941e55e117b0eff10deb54cb37f1a24b4392244a8388eb80d02d1495ca1285e
|
File details
Details for the file symbolicmode-0.3-py3-none-any.whl.
File metadata
- Download URL: symbolicmode-0.3-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6938d265573d216259b8afd341459bcd044bd38141e1060da6ea5860be012bbf
|
|
| MD5 |
53b8ece69b4562e0a3cddaebde708c7a
|
|
| BLAKE2b-256 |
9f5d94d4d44939b4928930614704b934eafe0924b7e4c029f75a413f36028ea2
|