Beta — Docker bind mount permissions overhaul
This is a prerelease for testing on Synology NAS and other btrfs-backed bind mount setups. The :latest tag is not updated; pull explicitly with marcpope/borgbackupserver:v2.27.0-beta1.
What's new
Building on #143 (big thanks to @addvanced):
- Automatic UID/GID migration. Change
PUID/PGIDin.envand restart — the container chowns existing files for you. No manual commands. State is tracked in/var/bbs/config/.ownershipand migrations are only re-run when the configured values actually change. - MariaDB and ClickHouse UID remapping. New optional env vars
MYSQL_PUID/MYSQL_PGID/CH_PUID/CH_PGIDextend the PUID pattern to all three services, for users who want every file on the data volume owned by their host user. - Preflight guards. Container refuses to start (with a clear error) if PUID is 0, collides with another service's UID, or collides with an existing SSH client UID. No silent corruption.
- Detailed timestamped logging. Every migration step announces itself, with file counts before and elapsed time after so you can see what the container is doing on slow restarts.
ensure_dirhelper + Dockerfile cleanups from the original PR (~70MB image size reduction, btrfs write-bit fix).
Testing
Pull the tagged image:
```bash
docker pull marcpope/borgbackupserver:v2.27.0-beta1
```
Or in compose:
```yaml
image: marcpope/borgbackupserver:v2.27.0-beta1
```
Known notes
- Existing installs upgrading with default PUID=33 see zero change — migration only runs when PUID/PGID actually differ.
- First migration on large repositories (millions of files) can take several minutes. Logs report per-path progress.
- Bind-mounted volumes only. Named Docker volumes are unaffected.
Please report any issues you hit on #121 or as new issues.