From: Brice Waegeneire <brice@waegenei.re>
To: 52454@debbugs.gnu.org
Subject: [bug#52454] [PATCH 0/4] Ensure correct ownership of directory trees in services.Hello Guix,
Date: Sun, 12 Dec 2021 19:28:35 +0100 [thread overview]
Message-ID: <87h7bdad9o.fsf@waegenei.re> (raw)
Hello Guix,
A number of times I got hit by newly configured service not starting because
of wrong ownership for files they ought to own. This appear when
reconfiguring a operating system with a service that was unsed in the past,
but not present in previous generation. For example, this time, cuirass and
postgresql service wouldn't start because that system had them running before,
but a few weeks ago I reconfigured the operating system without them and now
that I want to have these services running again they won't start because the
activation scripts were only changing the ownership of the runtime, data, log
and co. directories but not their content. Concretely
/var/lib/postgresql/data/PG_VERSION (and others) wasn't owned by
postgresql:postgresql but by an other pair of UID/GID, however
/var/lib/postgresql had the correct ownership
This patch fix such UID/GID mismatch for the cuirass and postgresql service by
recusrivly changing the owner and group of the whole tree these services
need. And not just the root directories of theses trees. It is related to the issue
<https://issues.guix.gnu.org/45571> about stable UID/GID in Guix's containers.
Cheers,
- Brice
Brice Waegeneire (4):
syscalls: Add 'lchown'.
activation: Add 'lchown-recursive'.
services: postgresql: Ensure correct ownership of directory trees.
services: cuirass: Ensure correct ownership of directory trees.
gnu/build/activation.scm | 22 ++++++++++++++++++++--
gnu/services/cuirass.scm | 18 +++++++++++-------
gnu/services/databases.scm | 14 +++++++++-----
guix/build/syscalls.scm | 16 ++++++++++++++++
4 files changed, 56 insertions(+), 14 deletions(-)
base-commit: 604880ae22e1a7662acb1d3f282242470de0cd03
--
2.34.0
next reply other threads:[~2021-12-12 18:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-12 18:28 Brice Waegeneire [this message]
2021-12-12 18:36 ` [bug#52454] [PATCH 1/4] syscalls: Add 'lchown' Brice Waegeneire
2021-12-18 21:34 ` [bug#52454] [PATCH 0/4] Ensure correct ownership of directory trees in services.Hello Guix, Ludovic Courtès
2021-12-21 19:30 ` [bug#52454] [PATCH v2 0/4] Ensure correct ownership of directory trees in services Brice Waegeneire
2021-12-21 19:36 ` [bug#52715] [PATCH v2 1/4] syscalls: Add 'lchown' Brice Waegeneire
2021-12-21 19:36 ` [bug#52713] [PATCH v2 2/4] activation: Add 'lchown-recursive' Brice Waegeneire
2021-12-21 19:36 ` [bug#52714] [PATCH v2 3/4] services: postgresql: Ensure correct ownership of directory trees Brice Waegeneire
2021-12-21 19:36 ` [bug#52712] [PATCH v2 4/4] services: cuirass: " Brice Waegeneire
2021-12-12 18:36 ` [bug#52454] [PATCH 2/4] activation: Add 'lchown-recursive' Brice Waegeneire
2021-12-12 18:36 ` [bug#52454] [PATCH 3/4] services: postgresql: Ensure correct ownership of directory trees Brice Waegeneire
2021-12-12 18:36 ` [bug#52454] [PATCH 4/4] services: cuirass: " Brice Waegeneire
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h7bdad9o.fsf@waegenei.re \
--to=brice@waegenei.re \
--cc=52454@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.