Skip to content

Commit bbbcb1d

Browse files
committed
fix: run data-manager as the host operator's UID so hardlinks work both ways
`fs.protected_hardlinks=1` lets only a file's owner hardlink to it. The data-manager defaulted to UID 1001 (its image's `datamgr` user), the build helpers and the host CLI run as the operator (typically UID 1000), and any container the operator's UID launched (`--user 1000:1000` on the motis transitous-tools build) wrote to /data as 1000. Whoever wrote the file last owned it; whoever tried to link it next was almost always wrong. The motis build hit this on its config.yml — the data-manager API got HTTP 500 trying to hardlink an ubuntu-owned file from inside its own container. Pin the data-manager's runtime user to `${UID:-1000}:${GID:-1000}` so every actor writes as the same UID and `protected_hardlinks` becomes a no-op for the workflow. Override HOME to /tmp so tsx/python don't fight the image-baked /home/datamgr permissions.
1 parent cb7f195 commit bbbcb1d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

services/data-manager/service.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"image": "ghcr.io/medformatik/openmapx-data-manager",
1010
"tag": "latest",
1111
"expose": [4000],
12+
"user": "${UID:-1000}:${GID:-1000}",
1213
"environment": {
14+
"HOME": "/tmp",
1315
"DATA_DIR": "/data",
1416
"PORT": "4000",
1517
"HOST": "0.0.0.0",

0 commit comments

Comments
 (0)