Ludovic Courtès <l...@gnu.org> writes:

> keinflue <keinf...@posteo.net> writes:
>
>> I am not sure whether this is intended behavior, but it seems weird to
>> me. Inside e.g.
>>
>> guix shell -Cu test coreutils
>>
>> /home/test is mounted read-only and I do not see any way to make it
>> writable without sharing a host directory.
>
> 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:

--8<---------------cut here---------------start------------->8---
$ guix shell --no-cwd -C coreutils bash -- sh -c 'touch ~/foo'
touch: cannot touch '/home/user/foo': Read-only file system
--8<---------------cut here---------------end--------------->8---

Some software just fails to start in the container:

--8<---------------cut here---------------start------------->8---
$ 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')
--8<---------------cut here---------------end--------------->8---

Sure, I *can* use --writable-root, but I agree that root being read-only
is a good idea.  Maybe --writable-home, which would default to #t, would
be a good addition?

Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.



Reply via email to