all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#52454] [PATCH 0/4] Ensure correct ownership of directory trees in services.Hello Guix,
@ 2021-12-12 18:28 Brice Waegeneire
  2021-12-12 18:36 ` [bug#52454] [PATCH 1/4] syscalls: Add 'lchown' Brice Waegeneire
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Brice Waegeneire @ 2021-12-12 18:28 UTC (permalink / raw)
  To: 52454

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






^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-12-21 19:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-12 18:28 [bug#52454] [PATCH 0/4] Ensure correct ownership of directory trees in services.Hello Guix, Brice Waegeneire
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

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.