By: ananjiani <ananjiani@noreply.codeberg.org>
fix(romm): keep MariaDB ownership across system switches (#362) ## Summary ```diff -d /var/lib/romm-db 0755 root root - +d /var/lib/romm-db 0755 999 999 - ``` Keep the DB folder owned by MariaDB, just like the existing Redis folder rule. Systemd tmpfiles must not reset it to root while MariaDB is running. ## Evidence - **Before:** a throwaway folder on Theoden, with an existing file owned by UID 999, had the current tmpfiles rule applied. UID 999 could write its closed marker but could not unlink the file. **After:** the UID/GID 999 rule let the same user unlink it. No production DB files were changed. - All three archived/current bad tc.log files have the same first byte: ASCII A. [MariaDB 11.8.8 deliberately writes that marker during close, then deletes the file](https://github.com/MariaDB/server/blob/mariadb-11.8.8/sql/log.cc#L11044-L11065). A root-owned 0755 parent denies that delete to UID 999. The old shutdown journal is gone, so the exact historical deletion error cannot be quoted. - Current container and datadir use UID/GID 999. Its image and upgrade metadata both report MariaDB 11.8.8; no evidence of a version mismatch. - Changed-file hooks passed: nixfmt, statix, deadnix, ripsecrets, whitespace, merge conflicts, and file size. - No local Nix evaluation or build. NixCI must verify this branch before merge. ## Merge Danger **Door:** two-way One directory ownership rule. No recursive chown, image upgrade, tc.log deletion, SQL, or database recovery. This prevents the owner reset; it does not repair the existing bad log. **Blast Radius:** theoden Only the RomM MariaDB data directory. Leave this PR unmerged until review and required NixCI checks pass. Co-authored-by: Ammar <ammar.nanjiani@gmail.com> Reviewed-on: https://codeberg.org/ananjiani/infra/pulls/362