Lennart Poettering on Nostr: …context of DynamicUser=1: they allow such services to have persistent directories ...
…context of DynamicUser=1: they allow such services to have persistent directories on disk, that are properly owned by the short-lived UID. Implementing this comes with some ugliness however: what happens if I reference some state directory from a DynamicUser=1 service today where it will get UID X assigned, and tomorrow when I start it again it will get UID Y assigned?
Our solution was pragmatic: when this happens we recursively re-chown() the referenced directories…
Published at
2024-12-13 10:19:26Event JSON
{
"id": "f062d5d6cea98c5c9ddb63ccb11bf72b77e456a78456f67e5f07bb8200b555ca",
"pubkey": "1d95c32d9a9d95a54f98eb2eaa156f3d3a71dc49eca2c960b2b89962758f1cc0",
"created_at": 1734085166,
"kind": 1,
"tags": [
[
"e",
"a38110380fec371f71bf446eaff8f5822609704e4e0087f3a1a4c523b00876da",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://mastodon.social/users/pid_eins/statuses/113645005454816207",
"activitypub"
]
],
"content": "…context of DynamicUser=1: they allow such services to have persistent directories on disk, that are properly owned by the short-lived UID. Implementing this comes with some ugliness however: what happens if I reference some state directory from a DynamicUser=1 service today where it will get UID X assigned, and tomorrow when I start it again it will get UID Y assigned?\n\nOur solution was pragmatic: when this happens we recursively re-chown() the referenced directories…",
"sig": "5d40290798a36bb4f6d3b642d170e6a23b33d254ed8e59e0097da23e455717322a653fe845b2576b7391d2bb9eb7fa7801ced85fc338175a85543dbf91a016d0"
}