mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5323] [Issue]: Docker ownership repair misses nested ownership mismatches and blocks startup #2940
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#2940
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @NeoKazuya on GitHub (Aug 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5323
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Marinara's Docker startup skips its recursive ownership repair when the configured data and storage directories (
/app/dataand/app/data/storageby default) already belong to the runtime user, even if folders underneath them do not. After the private-storage hardening added in #4966, those missed folders cause anEPERMerror and prevent the container from starting.Expected behavior
With
MARINARA_SKIP_DATA_CHOWNunset, the official image should repair mismatched ownership within the mounted data directory before dropping to the non-root runtime user. A correctly owned top-level directory should not hide incorrectly owned descendants from that repair.Actual behavior
The entrypoint checks only the ownership of the two top-level data paths. If both already belong to UID/GID 1000, it skips the recursive repair completely. The server then starts as UID/GID 1000 and tries to apply private permissions throughout the storage tree. When a root-owned descendant needs its mode tightened, UID 1000 cannot
chmodit and storage initialization aborts.In the affected installation,
/app/data/storagewas already1000:1000, while four oldercollectionsandcollections.backup-*trees beneath it were stillroot:root. Correcting only those trees to1000:1000allowed the container to start again.Steps to reproduce
/app/datain the official Docker image./app/dataand/app/data/storageto UID/GID 1000, but leave a0755directory underneath/app/data/storageowned by root. LeaveMARINARA_SKIP_DATA_CHOWNunset.Environment
stagingimage at source revision9a810f64edb131c21735616f8fdce5265440af39acltype=posix)Logs, screenshots, or video
Relevant ownership before recovery:
The container exited with code 1 and restarted repeatedly.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@NeoKazuya commented on GitHub (Aug 20, 2026):
@SpicyMarinara did you want to handle this or should I open a PR with the fix I have lined up?
@SpicyMarinara commented on GitHub (Aug 20, 2026):
@NeoKazuya can you throw the fix since you have it already? Thank you!