Each person's folder in the browser, done as the folder's owner
  • Python 52.4%
  • JavaScript 32.3%
  • HTML 15.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-14 20:18:38 +00:00
src filesd serves /warehouse by default 2026-11-14 21:16:24 +01:00
.gitignore feat: scaffold splent_feature_file_manager with splent feature:create 2026-11-13 15:29:35 +00:00
COPYING feat: scaffold splent_feature_file_manager with splent feature:create 2026-11-13 15:29:35 +00:00
COPYING.LESSER feat: scaffold splent_feature_file_manager with splent feature:create 2026-11-13 15:29:35 +00:00
MANIFEST.in feat: scaffold splent_feature_file_manager with splent feature:create 2026-11-13 15:29:35 +00:00
pyproject.toml chore: release splent-io/splent_feature_file_manager to v0.1.6 2026-11-14 20:18:38 +00:00
README.md A file manager for each person's folder: resumable uploads, zip downloads, preview, folders, rename, move and delete, done as the owner through filesd 2026-11-13 20:03:13 +01:00

splent_feature_file_manager

The file_manager feature of a SPLENT product line.

A SPLENT feature is a Python package that a product composes with others: its models, routes, services, templates and hooks are registered when the product starts. What this feature provides and requires is listed in the [tool.splent.contract] section of pyproject.toml, which splent feature:contract --write keeps in sync with the source.

Use it in a product

splent feature:add splent_feature_file_manager

filesd, in production

The web app never opens a person's folder as itself. With FILE_MANAGER_URL set it asks filesd, which forks a process per request that becomes the folder's owner before touching anything, so the kernel (and the NFS server) apply that person's permissions and quota. filesd needs only the standard library: copy filesd.py and files.py side by side to the machine that mounts the folders and run it as root with no capability but SETUID and SETGID, for instance with systemd:

[Service]
EnvironmentFile=/etc/filesd.env   # FILE_MANAGER_TOKEN, FILE_MANAGER_DIR, FILE_MANAGER_HOST
ExecStart=/usr/bin/python3 /opt/filesd/filesd.py
CapabilityBoundingSet=CAP_SETUID CAP_SETGID
AmbientCapabilities=
NoNewPrivileges=yes

Listen only where the web app reaches it (FILE_MANAGER_HOST, the Docker bridge for instance), and give both sides the same FILE_MANAGER_TOKEN. Without FILE_MANAGER_URL the app opens the folders itself, which is what development and tests do.

Develop

splent feature:test splent_feature_file_manager
splent feature:contract splent_feature_file_manager

Release

splent feature:release splent_feature_file_manager --dry-run --bump patch
splent feature:release splent_feature_file_manager

The first command rehearses the release and changes nothing. The second publishes it to the git forge and to PyPI, and a PyPI version is permanent.