filebrowser: named volume for user dirs, rename linked→additional dirs

docker-compose now uses two separate mounts:
  fb_users named volume → /srv      (user home dirs + shortcuts, Docker only)
  FB_PATH bind mount    → /srv/data (actual files, unchanged on host)

User dirs and their shortcuts live entirely in the Docker named volume —
they persist across reboots but never appear on the host filesystem.
Full-access scope is /data; per-user scopes are /alice etc.

manage_users.sh:
- Detect layout: get_data_root() returns /srv/data (new) or /srv (legacy)
  so the script works with both old and new installs automatically
- "Linked directories" renamed to "additional directories" throughout
  (menu labels, prompts, error messages, usage text)
- prompt_add_links → prompt_add_dirs, menu_links → menu_add_dirs
- Available-folder listing and symlink targets use get_data_root()
- Scope examples updated to show /data for full access (new layout)
- Don't offer additional directories when scope is /data (full access)

https://claude.ai/code/session_014CCYqVwW6d6f5dw1qRokYt
This commit is contained in:
Claude
2026-06-08 02:23:07 +00:00
parent 659b3924c0
commit 39c85326e6
2 changed files with 84 additions and 65 deletions
+9 -2
View File
@@ -184,7 +184,8 @@ services:
environment:
- TZ=${SITE_TZ:-$(cat /etc/timezone 2>/dev/null || echo UTC)}
volumes:
- ${FB_PATH}:/srv
- fb_users:/srv
- ${FB_PATH}:/srv/data
- ./database/filebrowser.db:/database/filebrowser.db
- ./config/settings.json:/config/settings.json
ports:
@@ -192,6 +193,9 @@ services:
networks:
- caddy_net
volumes:
fb_users:
networks:
caddy_net:
external: true
@@ -243,7 +247,10 @@ Web-based file manager. Browse, upload, and download files through a browser.
- Default login: admin / admin (change immediately!)
## Data
- Browsed path: $FB_PATH (mounted to /srv)
- Browsed path: $FB_PATH (mounted to /srv/data inside container)
- User home dirs: Docker named volume fb_users (no host clutter)
- Admin full-access scope: /data
- Per-user scope example: /alice
- Database: ./database/filebrowser.db
- Settings: ./config/settings.json