GNU bug report logs - #78355
guix-ownership inconsistent state

Previous Next

Package: guix;

Reported by: Rutherther <rutherther <at> ditigal.xyz>

Date: Sat, 10 May 2025 15:35:01 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#78355: closed (guix-ownership inconsistent state)
Date: Tue, 01 Jul 2025 22:30:05 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 01 Jul 2025 23:44:16 +0200
with message-id <87h5zvy4b3.fsf <at> gnu.org>
and subject line Re: bug#78355: guix-ownership inconsistent state
has caused the debbugs.gnu.org bug report #78355,
regarding guix-ownership inconsistent state
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
78355: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78355
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Rutherther <rutherther <at> ditigal.xyz>
To: bug-guix <at> gnu.org
Subject: guix-ownership inconsistent state
Date: Sat, 10 May 2025 17:33:56 +0200
There are reports from users with inconsistencies in ownership, it seems that at
least /var/guix is sometimes left with wrong owner, but maybe even parts
of the store? I cannot verify that.

The guix-ownership service checks /gnu/store ownership to check if the
whole store and all files important for the daemon (/etc/guix,
/var/guix) are owned by the appropriate user.

If the folder isn't owned by appropriate user, it moves to those steps:
1. Fix permissions in /gnu/store - first under it, then /gnu/store
itself as last step
2. Fix /var/guix
3. Fix /etc/guix
4. Fix /var/log/guix

So from those laid out steps it should be obvious that if guix-ownership
service somehow stops between steps 1 and 2, it will never recover
ownerships of /var/guix, /etc/guix and /var/log/guix. /gnu/store should
change owner as last.

On the other hand it feels much of a coincidence users would be
consistently hitting reboots between those steps. So maybe I am
overlooking another thing. I checked the file-system-fold, it goes to
/gnu/store as last, so that would mean putting step 1 after 4 should fix
that. Still, maybe only /gnu/store itself should be skipped instead of moving
the step, and done as last, step 5 to ensure it's fine even if
file-system-fold somehow changed the ordering? Not sure how exactly it
should behave in that regard.

Regards
Rutherther


[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Rutherther <rutherther <at> ditigal.xyz>
Cc: 78355-done <at> debbugs.gnu.org
Subject: Re: bug#78355: guix-ownership inconsistent state
Date: Tue, 01 Jul 2025 23:44:16 +0200
Hi Rutherther,

Ludovic Courtès <ludo <at> gnu.org> writes:

> Rutherther <rutherther <at> ditigal.xyz> writes:
>
>> The guix-ownership service checks /gnu/store ownership to check if the
>> whole store and all files important for the daemon (/etc/guix,
>> /var/guix) are owned by the appropriate user.
>>
>> If the folder isn't owned by appropriate user, it moves to those steps:
>> 1. Fix permissions in /gnu/store - first under it, then /gnu/store
>> itself as last step
>> 2. Fix /var/guix
>> 3. Fix /etc/guix
>> 4. Fix /var/log/guix
>>
>> So from those laid out steps it should be obvious that if guix-ownership
>> service somehow stops between steps 1 and 2, it will never recover
>> ownerships of /var/guix, /etc/guix and /var/log/guix. /gnu/store should
>> change owner as last.
>
> Sorry for dropping the ball.  How about the patch below?

Pushed as c33bc8008090bafda228e475dedc71cd06f56e4f.

Thanks!

Ludo'.


This bug report was last modified 10 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.