GNU bug report logs - #78363
Home is read-only in guix shell container

Previous Next

Package: guix;

Reported by: keinflue <keinflue <at> posteo.net>

Date: Sat, 10 May 2025 23:00:02 UTC

Severity: normal

Merged with 78440

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: Tomas Volf <~@wolfsden.cz>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: keinflue <keinflue <at> posteo.net>, 78363 <at> debbugs.gnu.org
Subject: bug#78363: Home is read-only in guix shell container
Date: Fri, 16 May 2025 17:49:21 +0200
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:

>>> As noted in the ‘guix pull’ news, you can use ‘--writable-root’.
>>> Otherwise, everything but the current directory and /tmp is read-only.
>>
>> Does that make sense though?  You have already made an exception for
>> /tmp, I would argue that ~ is another candidate for special-casing.
>>
>> I think people would reasonably expect that touching a file in your own
>> home should work.  But it does not:
>>
>> $ guix shell --no-cwd -C coreutils bash -- sh -c 'touch ~/foo'
>> touch: cannot touch '/home/user/foo': Read-only file system
>>
>>
>> Some software just fails to start in the container:
>>
>> $ guix shell --no-cwd -C deluge -- deluged
>> 20:22:20 [ERROR   ][deluge.common:136 ] Unable to use default config directory, exiting... ([Errno 30] Read-only file system: '/home/user/.config')
>
> It’s surprising that deluged tries to write to ~/.config,

In absence of the configuration, it generates default one and stores it
into the ~/.config/deluge.  This behavior is sensible for this specific
program.

> but yeah, more generally, I agree that many programs will want to
> write to ~/.cache and the likes.
>
> So hmm, maybe we can make another exception?  It doesn’t hurt anyway
> since it’s a tmpfs.

Yeah, I agree.  I can try to produce a patch (I should have some time on
Sunday), but obviously anyone feel free to step in.

Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 2 days ago.

Previous Next


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