Commit Graph
7 Commits
Author SHA1 Message Date
Claude ea1a9cf3b7 manage_users.sh: list folders on demand with ? instead of auto-display
Auto-displaying all top-level dirs could be a wall of text.
Typing ? at the folder prompt lists them on demand instead.

https://claude.ai/code/session_01UZus2Q9gNTfUdqSMrhuX29
2026-06-07 23:27:54 +00:00
Claude c71c08ac87 manage_users.sh: show available folders before link prompt
List top-level directories from /srv so the user knows what to type
without having to guess. Subdirs (e.g. documents/shared) still work.
Skip link prompt when scope is / (user already has full access).

https://claude.ai/code/session_01UZus2Q9gNTfUdqSMrhuX29
2026-06-07 23:22:22 +00:00
Claude c584811be4 manage_users.sh: remove /srv from all user-facing prompts
Users think in FileBrowser folder names, not container paths.

- prompt_add_links: prompt now "Folder to add [done]:" with examples
  like "music  photos  documents/shared" — /srv added internally
- list_links: strip /srv prefix from displayed target paths
- menu_links: rename options to "Add folders" / "Remove a folder"
- scope prompts: remove the leading "/" hint (confusing); normalise
  internally instead
- ok message shows "(from path/subdir)" only when link name differs

https://claude.ai/code/session_01UZus2Q9gNTfUdqSMrhuX29
2026-06-07 23:18:50 +00:00
Claude 5fdeff3f9a manage_users.sh: inline link prompts on add/scope-change
- prompt_add_links: shared helper loops asking for /srv paths until
  blank Enter, creates symlinks via docker exec, skips bad paths
- cmd_add: offers linked-dir prompt right after user creation
- cmd_scope: offers linked-dir prompt after a scope change
- menu_links: tighter submenu (list + add loop + remove) replacing
  the old menu_symlinks; called from Modify option 5
- Scope prompts now show the leading / so the user only types the rest
- Note on delete: symlinks on disk survive user deletion (by design)

https://claude.ai/code/session_01UZus2Q9gNTfUdqSMrhuX29
2026-06-07 23:15:12 +00:00
Claude b884d79dd2 manage_users.sh: add linked-directory (symlink) management
New option 5 in the Modify submenu: "Manage linked directories"

- Lists existing symlinks inside the user's scope dir (via docker exec)
- Add: prompts for source path (/srv/...) and a display name, creates
  the symlink inside /srv<scope>/<name> → /srv<source> in the container
- Remove: lists links, prompts for name, refuses to delete non-symlinks
- Warns if source path doesn't exist yet; offers to create anyway
- Auto-detects container name from docker-compose.yml next to the script
- Checks that the container is running before any docker exec calls

This is the recommended workaround for FileBrowser's single-scope
limitation: symlinks inside the scope dir appear as normal folders.

https://claude.ai/code/session_01UZus2Q9gNTfUdqSMrhuX29
2026-06-07 23:07:27 +00:00
Claude 141c9115a7 Rewrite manage_users.sh: add interactive menu, fix password nameref bug
- Interactive menu when run with no args (login once, reuse token)
- Modify submenu: change username, password, scope, or toggle admin
- Fix: prompt_password now uses local -n nameref (bash 4.3+) so the
  caller's local variable is actually set; printf -v was writing to
  global scope and being shadowed by the caller's local declaration
- One-shot commands unchanged: list/add/delete/passwd/scope/rename/info
- FileBrowser only supports one scope per user — documented clearly

https://claude.ai/code/session_01UZus2Q9gNTfUdqSMrhuX29
2026-06-07 22:52:42 +00:00
Claude 9c52ac22e1 Fix Caddy routing: use container:port via caddy_net (DoTheEvo pattern)
Undo the host.docker.internal approach from the previous commit — proper
Docker networking routes Caddy to services by container name on the shared
caddy_net, not via the host gateway.

- lib/common.sh: configure_caddy_for_service now accepts either a plain
  port number (localhost:PORT fallback) or container:port (preferred).
  The Caddyfile entry uses the container name for direct Docker DNS routing.
- services/caddy.sh: remove extra_hosts hack; update Caddyfile template
  comments to show container_name:port format
- All service files: update configure_caddy_for_service calls to pass
  container_name:internal_port (e.g. "filebrowser:80", "mealie:9000").
  Services using network_mode:host keep plain port numbers.
- tools/manage_users.sh: new FileBrowser user-management script (deployed
  to ~/docker/filebrowser/ during installation). Manages users via the
  FileBrowser REST API: list, add, delete, passwd, scope, info commands.
  Documents username format (letters/numbers/hyphens/underscores),
  password rules (min 8 chars, letter + number required), and scope path
  convention relative to /srv (= FB_PATH on the host).

https://claude.ai/code/session_01UZus2Q9gNTfUdqSMrhuX29
2026-06-07 22:12:01 +00:00