Shortening the retention deleted history at once and for good, with no
second look. Besides mistakes, it was a way to remove traces: anyone with an
open admin session could wipe the history of what they did.
Now (owner's decision 2026-11-30):
- PUT /api/v1/settings/app?dry_run=1 saves nothing and returns what the new
retention would remove (entries, backups, oldest entry left) and whether
it is shorter.
- A shorter retention (fewer days or entries) needs a recently confirmed
password (403 confirm_password, like deleting data, F-AUT-5). A longer one
removes nothing new and needs none.
- System page: Save on a shorter setting shows the preview first ("Removed
now: 237 entries and 17 backups; the oldest entry left is from …",
can't be undone); "Remove now" applies it, and the UI asks for the
password when needed. While the preview is open the fields are locked, so
what was previewed is what gets applied. When nothing would be removed now
the button says "Save shorter history".
- The daily trim stays automatic; it only removes what the confirmed
setting already lets expire.
Trim got a dry-run mode (journal and backups are only counted);
Retention.Shorter compares two retentions.
Tests: dry run changes nothing (configstore), Shorter (changes), API:
preview saves and removes nothing, shorter without a recent password is
refused and changes nothing, longer needs no password, after confirming it
applies (internal/server); e2e on CT 151 desktop + phone. Checked in a real
browser on CT 151 after the 5-minute window: the password dialog appears
("Shortening the change history needs your password again"), and after
confirming the setting is saved.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The change journal and the config backups grew forever: every entry holds
the full content of the changed files, and every change left a backup copy.
The history also holds personal data (who changed what, user names), which
the GDPR's storage limitation says not to keep longer than needed.
Retention, owner's decision 2026-11-30:
- Entries older than 365 days go, and of the rest at most the newest 1,000
stay (whichever is reached first). Both values are app settings: System
page, PUT /api/v1/settings/app (history_days 7–3650, history_entries
50–100000) or settings.json; out-of-range values in the file fall back to
the defaults, never to "keep forever".
- Applied at start, once a day, and right away when the setting changes.
The journal is rewritten atomically (temp file + rename), so a crash leaves
the old or the new file; unreadable lines, already ignored, are dropped.
- Backups older than the oldest kept entry go; the newest 10 per file always
stay. Backup names now carry a UTC timestamp, so writing and reading them
agree in every time zone.
- What a trim removed is itself an audit entry; the setting change too.
- The Changes page says how long the history is kept and how far back it
goes (GET /api/v1/changes → kept).
Privacy: docs/privacy.md lists what personal data Sharestead keeps, where,
for how long and how to delete it (incl. when someone leaves), and that it
sends nothing anywhere. N-17 in the requirements; README links to it.
03-solution-design: retention row added; the user/group undo row now says
audit only (F-HIS-8 was dropped).
Tests: retention rules (changes, 98%), journal and backup trimming on real
files incl. undo after a trim and unrelated files kept (configstore),
settings defaults and fallback, API (defaults, trim on change, bounds,
history entries); e2e on CT 151 (desktop + phone), axe unchanged. Checked on
CT 151: history_entries 50 trimmed 286 → 51 entries and 43 → 26 backups,
journal still 0600. Coverage minimums raised (total 77, server 85, auth 95).
Test changed because: web/e2e/fixtures/base.json is a recorded API answer
that fixtures_test.go checks against the API description; GET
/api/v1/settings/app and GET /api/v1/changes now have the required fields
history_days/history_entries and kept. Only those fields were added (two
existing lines got a trailing comma); no expectation changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Compared every requirement in 02-requirements with the code on main (routes,
code, tests; #22 counted as it is about to land) and cleaned up with the
owner (2026-11-30):
- ✅ in the release column for what is built (new legend entry), so the
state is visible without searching the code.
- Removed (owner's decision): F-SHR-9 raw "Advanced" parameter editor — hand
edits in smb.conf are the advanced mode and are kept (its "kept and shown"
part moves to F-CFG-2); F-HIS-8 undo of users/groups through inverse
operations — large for little use, those changes stay audit-only; the
CSV/JSON export of F-HIS-11 — the API gives the same data.
- Duplicates removed: F-USR-6 (self-service, done as F-AUT-7) and F-AUT-3
(audit log, done by the change history).
- Duplicate IDs fixed: TOTP is F-AUT-8 (F-AUT-6 is the dropped passkey
login); the protective read-only action is F-MON-13 (F-MON-11 stays the
limitations, which code and tests refer to).
- MVP items not built moved to v1: first-run wizard (F-INS-4), CLI user
changes in the history (F-HIS-10), journal retention (F-HIS-12), NFS
options in plain words and NFS versions (F-NFS-3, F-NFS-6), certificate
expiry and quota-scan checks (part of F-MON-1), admin access check
(F-MON-6), automatic service restarts (F-MON-12), app release checks
(F-UPD-1/2/3/7/8 — there are no releases yet), protective action (F-MON-13).
- Corrected: F-SHR-5 (force group and create masks instead of setgid), N-8
WCAG 2.2 AA like F-UX-2, the family-member persona (changes their own
password now; office staff added), F-QUO-8 after F-QUO-7.
- MVP checklist rewritten for the planned NAS (a VM with host folders):
personal folder limits instead of per-user quotas, DLNA instead of the open
TV question, subfolder access added, the Cockpit removal on CT 110 dropped
(homelab task, not product).
Test changed because: comment only — web/e2e/ui-states.spec.ts cited
F-SHR-9 for "custom settings are shown and not overwritten"; that guarantee
now lives in F-CFG-2. The test code is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflict in internal/server/server.go only: the api struct literal. This
branch added folderFix, main removed passkeys (#21); both kept.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README was a developer note from the first weeks (LXC as the main target,
no features, no install steps). It now says who it is for (homes and small
to medium offices), what it does per area, what it deliberately doesn't do,
the requirements, how to install and log in, and keeps a short development
section pointing to AGENTS.md. It describes the feature set after the
removal of Swagger UI and passkeys (#20, #21).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner's decision 2026-11-30 after a cost/value review. WebAuthn only works
when the UI is opened by host name with a trusted certificate; most homes and
small offices use an IP address and the self-signed certificate, where
passkeys don't work at all. For that it cost ~800 lines of security-relevant
code and 9 of the 11 Go dependencies (go-webauthn and what it pulls in: cbor,
go-tpm, jwt, uuid, mapstructure, msgp, …), each a source of update churn.
Removed: internal/app/passkeys, the /api/v1/auth/passkey/* and
/api/v1/me/passkeys* routes and their API description, auth.LoginVerified /
Failed / Blocked (only passkey login used them), the passkey button on the
login page, the Passkeys card on "My account", lib/webauthn.ts, the
dependencies (go mod tidy: go.mod now needs only pam and x/sys). F-AUT-6 is
marked dropped in 02-requirements with the reason. Password login, its
backoff and locked-account checks are unchanged.
Existing installations keep /var/lib/sharestead/passkeys.json; nothing reads
it any more (public keys only, no secret).
Effect: .deb 5.4 → 4.1 MB. Checked on CT 151: the passkey routes answer 404;
login, wrong password, self-service, own account, CSP and axe e2e tests pass
on desktop and phone.
Test changed because: these tests covered the removed passkey feature
(F-AUT-6, dropped by the owner) and are deleted with it:
internal/app/passkeys/passkeys_test.go; TestPasskeysNeedAHostName,
TestDeletingAUserForgetsTheirPasskeys, TestMyPasskeys,
TestPasskeyLoginIsBlockedDuringBackoff (internal/server);
TestPasskeyLoginOfLockedAccountIsRefused and the passkey half of
TestLockedAccountCantLogIn (internal/auth; its password half stays);
web/src/lib/webauthn.test.ts; the e2e test "passkeys: add one, log in with
it, remove it". The requirements they covered for passwords (backoff, locked
accounts, own account) keep their own tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A share folder recreated by hand (e.g. rm -rf + mkdir: root:root 0755
instead of root:sst-<share> 0770) looked healthy in Sharestead while
nobody could write over SMB (NT_STATUS_ACCESS_DENIED). Reproduced on
VM 152. F-SHR-5 asks for a warning when disk permissions contradict the
share, F-MON-1 for a continuous permission drift check.
- The share model knows "force group" (smb.SMB.Group).
- Health check: for shares with a force group, the folder must belong to
that group and the group needs r-x, plus w when anyone may write;
otherwise a critical problem with expected vs found, steps (incl. the
commands by hand) and the fix "Restore permissions". A missing folder
stays one problem (folder missing), not two.
- The fix (POST /problems/fix "permissions:<share>") sets the folder's
group and adds the missing group bits — nothing removed, not recursive,
only inside the storage roots, no symlinks (rootfs.RepairGroup over
os.Root); recorded in the history.
Tests from the requirements: health (drift cases, read-only share needs
only r-x, hand-made shares without force group aren't judged), the fix
through the API, rootfs/osfs repair (runs without root), the filesystem
matrix on VM 152 (ext4, XFS, btrfs, ZFS: drift found and repaired) and a
UI scenario. End to end on VM 152 with the package: problem shown, fix
clicked, SMB write works again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner's decision 2026-11-30, after a review of features whose cost is out of
proportion to their value. Swagger UI was a second viewer next to the app's
own API page, which already shows every endpoint grouped, with "Try it" for
GET. It was about 1.8 MB of the 2.35 MB web assets, needed its own CSP
exception (data: images), and failed WCAG 2.2 AA upstream.
What stays: /api/v1/openapi.json (OpenAPI 3.1, generated from the code,
linted with Redocly, checked by the API contract tests) and the API page with
its download button; the file still opens in Postman, Bruno or any OpenAPI
tool.
Removed: the /api-docs route and its CSP, swagger.html, swagger.ts/.css and
the type stub, the swagger-ui-dist dependency, the second Vite entry. Web
assets are now ~305 KB; the .deb shrinks from 5.9 to 5.4 MB.
Checked on CT 151: /api-docs answers 404; API page, CSP and axe e2e tests
pass on desktop and phone.
Test changed because: the e2e test "API in Swagger UI: own page, logged-in
session, CSP only adds data: images" tested the removed page (F-API Swagger
view, dropped by the owner). The API page test, which covers the remaining
requirement (OpenAPI 3.1 description, grouped, Try it, openapi.json), stays
unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The owner found the first card hard to follow: list and editor mixed in one
card, a mini folder browser where opening and choosing were the same click,
and a rule that started from an empty list. Reworked after a mockup the owner
approved:
- The card shows the share's folders as a tree (loaded per level). Each row
says who can open it: "Same as the share", "Same as Finances" inside a
folder with its own access, or pills for its own access. Folders that hold
a rule are expanded on load, so every rule is in sight. Rows inside or above
a rule can't get their own (v1) and aren't buttons.
- A row opens a dialog (wide Dialog, full screen on phones) that starts from
the people with access to the share: columns Who · In the share · In this
folder. LevelPicker got a max: options above the share level are disabled
with the reason ("no access to the share"), since a folder can only narrow
its share.
- Review happens in the dialog: per person before → after, the number of
folders and files, the smb.conf change on request. "Remove own access"
lives in the dialog of a folder that has it.
- No access rows are only sent for users inside a group that keeps access
(to keep them out); other No access rows need no entry.
- Without POSIX ACLs: one line with the reason and "Why?", no tree.
Tests: lib/subfolders.ts helpers (share level from smb.conf semantics incl.
invalid users, folder state, rows, entries) with 16 unit tests; e2e rewritten
for the tree and dialog (desktop + phone on CT 151); axe on the page and on
the open dialog (edit and review): no violations. A first version gave the
tree rows an aria-label that didn't contain their visible text; axe caught it
(WCAG 2.5.3) and the rows now use their text as name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI runs the tests as root: the rule folder really becomes root's there, so
the note "the folder belongs to X, who keeps owner rights" was only reached
as a normal user (CI 91.4% vs 92.3% locally). A direct test of that note now
covers it either way. The minimum for internal/app/subfolders is 91.0 to
leave room for the remaining root/non-root differences.
The ACL probes in the test helpers use the IDs the tests then set, so a run
in a user namespace (unshare -r, only one uid mapped) skips instead of
failing; the /proc test accepts failed items as well as an error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A subfolder (e.g. Family/Finances) can get its own list of users and groups
with Read or Read & write; nobody else gets in. Users can be set to No access
to keep them out of a listed group. The share's own access still applies.
How it works:
- POSIX ACLs on the subfolder and everything inside, with the same entries as
default ACL so new files inherit them. The kernel enforces them, so SMB, NFS
and local access behave the same (ADR-10).
- The subfolder is given to root (group kept), so whoever created it doesn't
keep owner rights to it.
- The share's create mask / directory mask get group rw / rwx when missing
(journaled smb.conf change, shown in the review). Samba's default 0744
becomes the ACL mask of new files and capped every named user at read:
reproduced with Samba 4.22 on CT 151; "inherit acls = yes" did not help.
- ACLs are written in the kernel's xattr format by internal/adapters/aclfs
(bytes checked against what setfacl stores). The walk uses an os.Root,
skips symlinks, and opens each item with openat + O_NOFOLLOW from its
parent: a share user swapping in a symlink can't redirect the root process.
setfacl -R isn't used because it works on paths. os.Root.OpenFile followed a
symlink despite O_NOFOLLOW (found by a test), hence the explicit openat.
- The ACLs on disk are the source of truth and are read back on every load;
hand changes are listed per subfolder. The app settings only list which
subfolders have rules.
- Removing a rule gives the tree what the folder above gives (its default
ACL, else its permission bits).
- Refused: personal folders, guest shares (force user), storage without ACLs
(greyed out with the reason and a "Why?" link to the limitation), rules
inside or above another rule (v1), more than 32 entries.
- The ACL change is recorded in the history (audit, not undoable; the review
says so); the smb.conf part is undoable as usual.
API: GET/PUT/DELETE /api/v1/shares/{name}/subfolders (PUT/DELETE with
?dry_run=1). UI: "Subfolders with their own access" card on the share page.
Tested: unit tests from acl(5)/kernel bytes (domain/acl 98%), service tests on
real ACLs in a temp dir (92%), adapter (85%), API via the harness, 16 mutants
all caught; e2e on CT 151 (desktop + phone); smbclient checks on CT 151 (ZFS
with ACLs; no-ACL dataset refused) and VM 152 (XFS, ext4; virtiofs refused).
Total coverage 76.8% (minimum raised to 76.0).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The API sent severity "info" for limitations, but the API description
only allowed critical|warning (found by the fixture check against the
description).
- Two UI scenarios: a limitation alone is listed under "Limitations" with
"Understood", the Problems page still says everything works, and no
warning/problem count appears; an acknowledged one is under
"Acknowledged (1)", readable, with "Show again" (F-MON-11). Counting
limitations as problems again makes the first one fail (checked).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Missing requirements Sharestead handles are no longer errors and no
longer hide in single sentences:
- internal/app/limitations derives them from the capability checks:
POSIX ACLs off per storage folder, filesystems without Linux
permissions (vfat, exFAT, NTFS), running in a container, systemd not
reachable. Each says what isn't available, why, and what would change
it — generically, no host commands (owner's decision).
- Listed with the problems as severity "info", after critical and
warning; the UI counts only problems (sidebar, dashboard).
- "Understood" (PUT /api/v1/limitations/acknowledged) stores the
limitation's fingerprint (ID, cause, facts) in the app settings: it
moves to "Acknowledged (n)", stays readable there with "Show again",
and comes back on its own when its facts change.
- "Why?" links: storage check rows → #/problems?show=<id> (scrolls,
opens Acknowledged if needed, marks the entry); share limit greyed for
non-SMB shares → #/help?term=shareLimit; Services "state unknown" →
the systemd limitation.
Tests from the spec (F-MON-11, design §4.5e): the new package 100 %
(4 deliberate faults, all caught), API incl. the API-description
contract (it caught an undocumented 404), ordering in the health check,
the frontend ID mapping, e2e flow on CT 151 and VM 152 (desktop, phone).
Coverage minimums in .coverage-min hold (total 75.4 %).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Development is largely automated; when a test fails, the shortest path to
a green CI is changing the test. Three safeguards:
- Test guard (CI job, every PR): changing or deleting existing test
lines, deleting a test file or lowering .coverage-min / .mutation-min
fails unless a commit message says "Test changed because: …". Adding
tests is free. The script is taken from the target branch, so a PR
can't disable it for itself. Checked against 7 cases (new test, changed
expectation with/without reason, coverage minimum lowered/raised,
deleted test file, code-only change).
- Owner approval, optional: with the repo variable TEST_GUARD_APPROVER
such a PR also needs that person's approving review of the latest
commit (checked through the API: state, user, commit, not dismissed).
- Weekly mutation check: gremlins on server, access mapping, path
confinement and auth; efficacy may not fall below .mutation-min.
gremlins' own --threshold-efficacy doesn't change its exit code
(v0.5.0, verified), so the script compares the summary itself.
AGENTS.md: what to do when a test fails (spec first, reproduce on the
real system, fix the code — or say why the test was wrong).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New CI job "smb": the built package and smbd in a fresh Debian 12
container. The test creates a group, users, shares (group, everyone,
mixed levels, an excluded member, public), changes options and access,
a password, disables/enables and deletes a user, switches on personal
folders — all through the API — and connects with smbclient as each
user and as a guest: none / read / write must be what the requirements
say (F-SHR-2/3/4/8/10, F-USR-1/2, F-DIR-5, MVP checklist). Passwords go
to smbclient via the environment, not the command line. Everything it
creates is removed again.
Verified on VM 152 against the installed package and smbd: green, and
nothing left behind afterwards.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/fs-matrix.sh mounts small images (ext4, XFS, btrfs, vfat, exFAT,
ZFS with ACLs on/off, XFS/ext4 project quota, ZFS refquota, a tiny ext4
with the default root reserve, a drive mounted inside a folder), runs the
fsmatrix test binary as root and removes everything again. Filesystems
the script sets up are required: a missing one fails instead of being
skipped silently.
Checked from the requirements: ACL detection with reason and a generic
fix (F-INS-8); share folders get group + 0770 or fail, never a silent
success with other permissions (F-SHR-5); deleting never removes a
mounted drive (F-DIR-6); usage is bytes on disk (F-QUO-1); full storage
is a warning/critical for the shares on it and clears again (F-MON-1/4);
hard limits set outside show as the share size (F-QUO-5).
All pass twice in a row on VM 152; with the old usage formula the full
storage test fails as it should. ext4 can't be mounted with noacl on
current kernels, so "ACLs off" is covered by ZFS acltype=off and
vfat/exFAT.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Samba writes as the logged-in user, so root's reserve on ext4 (5 % by
default) isn't free space for shares. Usage reported used/(all blocks),
so a disk that refused every write for users showed as 91 % (64 MiB
image) or about 95 % (large disks) — a warning instead of "full,
critical" (F-MON-1). Reproduced on VM 152: a normal user got "I/O error",
df showed 100 %, Sharestead 91 %.
osfs.Usage and the storage report now compute total as used + available
to normal users (df's Use%); both places the same, so the hard-limit
detection in the UI keeps comparing like with like.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Switching personal folders on with a default limit failed on every first
try with "smb.conf changed in the meantime": the UI saved the default
limit first, which set Samba up for limits (writes an include into
smb.conf), and then applied the reviewed [homes] change against the now
outdated version. The e2e test only passed on its retry, so CI never
showed it.
F-HIS-3: one UI action is one change set. PUT /api/v1/homes takes
default_limit; the include for limits is written in the same change as
[homes], so the review shows both and the apply uses the reviewed
versions. The default is saved afterwards and new folders get it.
Regression test: TestPersonalFoldersWithALimitAreOneChange.
failOnFlakyTests in CI: a test that only passes on its retry fails the
run, so a failure like this can't hide behind the retry again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A table of situations that are hard to create on a real system (no ACLs,
ACL check failed, NFS-only share, hard limit, full or almost full share,
custom settings, missing share folder, NFS switched off, DLNA missing or
unable to read a folder, crashed Samba, full personal folder, security
updates / restart needed / no automatic updates). The browser test answers
the API from fixtures and checks what the requirements say the UI shows
(references per test); nothing is sent to the server.
The fixtures can't drift from the real API: base.json is recorded from the
CT 151 test instance, scenarios.json changes it, and fixtures_test.go
checks every resulting body against the API description (types, required
fields, enums, no unknown fields). Injected UI faults (limit form not
greyed, ACL reason missing, custom share editable) are caught.
Found on the way: on phones the problem indicator showed the same "⚠ n"
for critical problems and warnings, so severity was only visible by colour
(F-UX-2, WCAG 1.4.1). It now shows ⛔ and says "n critical".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ReadableBy evaluates another account's permission bits, independent of
who runs the test; the skip for root was wrong and dropped osfs coverage
in CI (runs as root) below its minimum.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
07-security-and-testing: the principle (expected results from the spec,
fakes behave like the real system), the API behaviour and contract tests,
the mutation check, the new PR gate and the coverage ratchet with targets.
AGENTS.md: how to write tests here and run the root-only ones.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- .coverage-min + scripts/coverage-check.sh: coverage of the total and the
security-relevant packages may not fall; CI says when a minimum can be
raised. A fixed target would block every PR today; a ratchet only goes up.
- package build, install test (Debian 12/13) and e2e (Chromium + phone)
now run for pull requests too, so a PR can't be merged untested; only the
upload to the dev channel stays on main. Short fuzz for PRs as for pushes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gremlins on internal/server left mutants alive that are real behaviour:
a deleted user's passkeys, passkey login during backoff, Retry-After,
logout clearing the cookie, hand edits in the history, paging bounds,
PATCH groups, personal folder by default + default limit, a removed
share's limit, the update cache. rootfs: mount paths with an escape at
the end (a missed mount would let a drive's files be deleted).
The account fakes now update /etc/passwd and /etc/group like useradd and
groupadd do, so new accounts exist afterwards.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Expectations come from 02-requirements, 07-security and the API
description, not from the code:
- harness: real change store, journal, editor and files in a temp dir;
only system commands, validation and reloads are fakes
- every answer is checked against the API description (status listed,
errors are complete RFC 9457 problems)
- access is checked with an independent model of Samba's rules
(smb.conf(5)), incl. [homes]
- shares, NFS, undo/restore, users/groups (passwords only on stdin, never
in the journal), folders (confinement incl. symlinks), self-service,
diagnostics, services, DLNA, personal folders, limits, problems, updates
- CSRF and same-origin checked for every changing route
- osfs contract tests (root-only parts run with unshare -r)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Access: a user set to Read inside a group set to Read & write got write
access, because Samba's "write list" beats "read list" (smb.conf(5),
reproduced with smbclient on CT 151). Lists can't exclude members, so
such a setting is now refused (422) with what to do instead. The check
uses the real memberships incl. the primary group (accounts.GroupsOf);
users outside the group may still have Read.
- NFS: an invalid client (e.g. "pc lan") answered 500; it is input, 400.
- Undo: ?dry_run=1 applied the undo although the API description promised
a preview. Undo has no preview (the entry's diff shows it): dry_run is
refused with 400 and no longer documented.
- API description: list the answers the endpoints give (201 for new
groups; 404/409 on users, groups, folders, fixes; 422 on share access)
and the DLNA folder types.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The banner said writes on the server or over NFS were how it got past
the limit; on VM 152 the data was there before the limit was set. It
now names all causes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Where no hard limit is possible (a host folder mounted into the VM/LXC,
an LXC's own disk), a share can get a soft limit:
- Sharestead measures the folder (as for personal folders); a full share
is read-only over SMB for everyone through a second trailing include
(/etc/samba/sharestead/share-limits.conf) that repeats it with
read only = yes. Verified first on CT 151: a share-section include
with %S does NOT work (Samba doesn't substitute it there), a trailing
global include does, also against an explicit write list.
- Connections to a share whose state changes are closed (smbcontrol all
close-share) so it applies at once; dfree reports the space left in
the limit inside the share.
- Existing setups get the second include when the first share limit is
set; KeepLimitsLast keeps both last.
- PUT /api/v1/shares/{name}/limit; limits of deleted shares are dropped;
"Share X is full" on Problems.
- UI: "Size limit" card on the share page: a hard limit set outside is
shown (with a soft one too, if set); otherwise a soft limit with bar,
"full — read-only over SMB" and what isn't stopped; greyed with the
reason for shares not on SMB; personal folders point to their own
limits. Share list and dashboard show limit and "full".
- Problems page checks fresh when opened (it showed the last background
check, up to a minute old); saving a limit refreshes problems.
- The label's accessible name is just "Soft limit" (FieldLabel; it read
"Soft limit soft What is …?").
Verified on VM 152 with smbclient: Media (ext4, 126 MB, limit 100 MB)
refuses uploads, downloads work, clients see 1 KB free; HostData
(virtiofs) and Family (XFS) below their limits accept uploads. e2e on
CT 151 (desktop + phone), axe on both instances. Tests: domain, service,
API.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The glossary only had 'Subfolder permissions (ACLs)', explaining the use
but not what an ACL is, with a ZFS-specific tech line. Now two entries:
'ACL (POSIX ACL)' (what it is, which filesystems, off = owner/group/
others) and 'Subfolder permissions' (what it is for). The storage check
links both. Tooltips set white-space: normal, so an ⓘ inside a no-wrap
phrase no longer runs its text out of the box (seen in the screenshot).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VM 152 showed 'switch on POSIX ACLs where it is managed' for /mnt/host
without saying where. A virtiofs/9p folder always comes from the
virtualization host: the hint now says so (generic, no commands), and
9p no longer counts as remote storage that isn't probed. Test added.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner: with many shares the list didn't fit, and the disk lines were
named by share lists. Now:
- Storage: each filesystem once (grouped by device ID, not by equal
numbers), named by its storage folders and type, e.g. /srv/xfs (xfs),
with used/free and 'Family, Media + 5 more'.
- Largest shares: the 8 largest, 'All N shares →' beyond that; a share
whose folder reports less space than its filesystem shows 'limit X'
(hard limit set outside, e.g. a project quota).
Grouping logic in lib/storage-groups.ts with tests. Checked on CT 151
(ZFS) and VM 152 (XFS, ext4, virtiofs, system disk).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ACL probe ran with the HTTP request's context. When the browser left
the page during the check, setfacl was killed ("context canceled") and
"unknown" was kept for 10 minutes — the unexplained "unknown" seen
earlier on CT 151 (reason now visible in the e2e output). The probe
now runs detached with its own 30 s timeout; a check cut short isn't
kept. Folders also report device ID, size and usage (read fresh on each
call) for the dashboard. Tests for both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>