ShenanigaNFS
Python library for making somewhat conformant-ish low-level NFSv2/3 clients and servers. Includes tools for making NFS servers with mount-specific FS state and a VFS API similar to FUSE for making custom filesystems.
Primarily meant for use-cases where a real FUSE filesystem shared over NFS wouldn't be appropriate, such as when each client must receive a distinct filesystem. Authentication is intentionally unsupported as are file locking and transport encryption.
Features
- SunRPC IDL -> Client / Server stub generator (outputs type hints too!)
- RPCBind / PortMapper server implementation
-
- Optional, can register services with system RPCbind if preferred
- Basic NFSv2 and NFSv3 implementations
asyncio-based networking, TCP-only for the moment- Example filesystems (SimpleFS, ZipFS)
Is this appropriate for production use?
No.
I needed the ability to expose an unauthenticated, world-writable filesystem to the public internet, and each mounter needed to have their writes only accessible to themselves, and it needed to be somewhat hardened against DoS. If you just need a user mode NFS server, I recommend NFS Ganesha.
Otherwise, the tools are low-level enough to be useful for reverse engineering and creating intentionally misbehaved filesystems.
Running RPCBind as non-root
See https://stackoverflow.com/a/414258 for how to allow your script to bind to low ports. In short:
sudo setcap 'cap_net_bind_service=+ep' /path/to/python
Acknowledgements
Metadata
Release files for ShenanigaNFS 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ShenanigaNFS-0.2.tar.gz | 45.9 kB | Without provenance | Details for ShenanigaNFS-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ShenanigaNFS-0.2-py3-none-any.whl | Python 3 | none | any | Details for ShenanigaNFS-0.2-py3-none-any.whl |
Total release size: 101.5 kB
Release files / ShenanigaNFS-0.2.tar.gz
| Download URL | ShenanigaNFS-0.2.tar.gz |
|---|---|
| Size | 45.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
994782c8947b35eac15d540d58cf60b9dcc1024a18f2f0cadd3baa5b0d977601
|
|
BLAKE2b-256 checksum How to use checksums |
5a82e690c02bc4dcfd2f642b14411306b9709f14228ebb84e315be9caff008e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / ShenanigaNFS-0.2-py3-none-any.whl
| Download URL | ShenanigaNFS-0.2-py3-none-any.whl |
|---|---|
| Size | 55.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b222cebf92fa1ee575624933475c8331fc1c8298b63052c433807011c1a16bbe
|
|
BLAKE2b-256 checksum How to use checksums |
995ccbfebf5133adc1c900271ba97d2b210e2838ed63fbfb40e917deea306758
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for ShenanigaNFS 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.